aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-dove
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-dove')
-rw-r--r--arch/arm/mach-dove/irq.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index bc4344aa1009..4a5a7aedcb76 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-dove/irq.c
@@ -108,6 +108,38 @@ static int __initdata gpio2_irqs[4] = {
108 0, 108 0,
109}; 109};
110 110
111#ifdef CONFIG_MULTI_IRQ_HANDLER
112/*
113 * Compiling with both non-DT and DT support enabled, will
114 * break asm irq handler used by non-DT boards. Therefore,
115 * we provide a C-style irq handler even for non-DT boards,
116 * if MULTI_IRQ_HANDLER is set.
117 */
118
119static void __iomem *dove_irq_base = IRQ_VIRT_BASE;
120
121static asmlinkage void
122__exception_irq_entry dove_legacy_handle_irq(struct pt_regs *regs)
123{
124 u32 stat;
125
126 stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_LOW_OFF);
127 stat &= readl_relaxed(dove_irq_base + IRQ_MASK_LOW_OFF);
128 if (stat) {
129 unsigned int hwirq = __fls(stat);
130 handle_IRQ(hwirq, regs);
131 return;
132 }
133 stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_HIGH_OFF);
134 stat &= readl_relaxed(dove_irq_base + IRQ_MASK_HIGH_OFF);
135 if (stat) {
136 unsigned int hwirq = 32 + __fls(stat);
137 handle_IRQ(hwirq, regs);
138 return;
139 }
140}
141#endif
142
111void __init dove_init_irq(void) 143void __init dove_init_irq(void)
112{ 144{
113 int i; 145 int i;
@@ -115,6 +147,10 @@ void __init dove_init_irq(void)
115 orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); 147 orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF);
116 orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); 148 orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF);
117 149
150#ifdef CONFIG_MULTI_IRQ_HANDLER
151 set_handle_irq(dove_legacy_handle_irq);
152#endif
153
118 /* 154 /*
119 * Initialize gpiolib for GPIOs 0-71. 155 * Initialize gpiolib for GPIOs 0-71.
120 */ 156 */