irq-mmp.c (dba5bedb96b0956a544b363227fd081d97701fd5) irq-mmp.c (8783dd3a37a5853689e1a8fa728827a50905b912)
1/*
2 * linux/arch/arm/mach-mmp/irq.c
3 *
4 * Generic IRQ handling, GPIO IRQ demultiplexing, etc.
5 * Copyright (C) 2008 - 2012 Marvell Technology Group Ltd.
6 *
7 * Author: Bin Yang <bin.yang@marvell.com>
8 * Haojian Zhuang <haojian.zhuang@gmail.com>

--- 8 unchanged lines hidden (view full) ---

17#include <linux/irq.h>
18#include <linux/irqdomain.h>
19#include <linux/io.h>
20#include <linux/ioport.h>
21#include <linux/of_address.h>
22#include <linux/of_irq.h>
23
24#include <asm/exception.h>
1/*
2 * linux/arch/arm/mach-mmp/irq.c
3 *
4 * Generic IRQ handling, GPIO IRQ demultiplexing, etc.
5 * Copyright (C) 2008 - 2012 Marvell Technology Group Ltd.
6 *
7 * Author: Bin Yang <bin.yang@marvell.com>
8 * Haojian Zhuang <haojian.zhuang@gmail.com>

--- 8 unchanged lines hidden (view full) ---

17#include <linux/irq.h>
18#include <linux/irqdomain.h>
19#include <linux/io.h>
20#include <linux/ioport.h>
21#include <linux/of_address.h>
22#include <linux/of_irq.h>
23
24#include <asm/exception.h>
25#include <asm/hardirq.h>
25#include <asm/mach/irq.h>
26
27#include "irqchip.h"
28
29#define MAX_ICU_NR 16
30
31#define PJ1_INT_SEL 0x10c
32#define PJ4_INT_SEL 0x104
33

--- 155 unchanged lines hidden (view full) ---

189};
190
191static struct mmp_intc_conf mmp2_conf = {
192 .conf_enable = 0x20,
193 .conf_disable = 0x0,
194 .conf_mask = 0x7f,
195};
196
26
27#include "irqchip.h"
28
29#define MAX_ICU_NR 16
30
31#define PJ1_INT_SEL 0x10c
32#define PJ4_INT_SEL 0x104
33

--- 155 unchanged lines hidden (view full) ---

189};
190
191static struct mmp_intc_conf mmp2_conf = {
192 .conf_enable = 0x20,
193 .conf_disable = 0x0,
194 .conf_mask = 0x7f,
195};
196
197static asmlinkage void __exception_irq_entry
198mmp_handle_irq(struct pt_regs *regs)
197static void __exception_irq_entry mmp_handle_irq(struct pt_regs *regs)
199{
200 int irq, hwirq;
201
202 hwirq = readl_relaxed(mmp_icu_base + PJ1_INT_SEL);
203 if (!(hwirq & SEL_INT_PENDING))
204 return;
205 hwirq &= SEL_INT_NUM_MASK;
206 irq = irq_find_mapping(icu_data[0].domain, hwirq);
207 handle_IRQ(irq, regs);
208}
209
198{
199 int irq, hwirq;
200
201 hwirq = readl_relaxed(mmp_icu_base + PJ1_INT_SEL);
202 if (!(hwirq & SEL_INT_PENDING))
203 return;
204 hwirq &= SEL_INT_NUM_MASK;
205 irq = irq_find_mapping(icu_data[0].domain, hwirq);
206 handle_IRQ(irq, regs);
207}
208
210static asmlinkage void __exception_irq_entry
211mmp2_handle_irq(struct pt_regs *regs)
209static void __exception_irq_entry mmp2_handle_irq(struct pt_regs *regs)
212{
213 int irq, hwirq;
214
215 hwirq = readl_relaxed(mmp_icu_base + PJ4_INT_SEL);
216 if (!(hwirq & SEL_INT_PENDING))
217 return;
218 hwirq &= SEL_INT_NUM_MASK;
219 irq = irq_find_mapping(icu_data[0].domain, hwirq);

--- 276 unchanged lines hidden ---
210{
211 int irq, hwirq;
212
213 hwirq = readl_relaxed(mmp_icu_base + PJ4_INT_SEL);
214 if (!(hwirq & SEL_INT_PENDING))
215 return;
216 hwirq &= SEL_INT_NUM_MASK;
217 irq = irq_find_mapping(icu_data[0].domain, hwirq);

--- 276 unchanged lines hidden ---