diff options
author | Tony Lindgren <tony@atomide.com> | 2015-05-20 12:01:21 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2015-05-20 12:01:21 -0400 |
commit | b694331cfb2ec3bc2225a0ea9fddbb7e24d81c37 (patch) | |
tree | a8acbec86f0f3369f3233f2d0b0b86915a001c7b | |
parent | 55b44774438959a957e717ecbdd9f2874b07ab31 (diff) |
ARM: omap1: Switch to use MULTI_IRQ
This allows us to get a bit further with SPARSE_IRQ and
MULTIARCH support.
Note that we now also rename omap_irq_flags to omap_l2_irq
as that's the omap_irq_flags naming is confusing. It just
contains the interrupt number for the l2 irq.
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-fsample.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-generic.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-htcherald.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmte.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmtt.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmz71.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-perseus2.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-sx1.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-voiceblue.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/common.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/entry-macro.S | 39 | ||||
-rw-r--r-- | arch/arm/mach-omap1/irq.c | 40 |
19 files changed, 53 insertions, 47 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 45df48ba0b12..881a76c586c2 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -752,6 +752,7 @@ config ARCH_OMAP1 | |||
752 | select GENERIC_IRQ_CHIP | 752 | select GENERIC_IRQ_CHIP |
753 | select HAVE_IDE | 753 | select HAVE_IDE |
754 | select IRQ_DOMAIN | 754 | select IRQ_DOMAIN |
755 | select MULTI_IRQ_HANDLER | ||
755 | select NEED_MACH_IO_H if PCCARD | 756 | select NEED_MACH_IO_H if PCCARD |
756 | select NEED_MACH_MEMORY_H | 757 | select NEED_MACH_MEMORY_H |
757 | help | 758 | help |
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 2aab761ee68d..a95499ea8706 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -626,6 +626,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)") | |||
626 | .map_io = ams_delta_map_io, | 626 | .map_io = ams_delta_map_io, |
627 | .init_early = omap1_init_early, | 627 | .init_early = omap1_init_early, |
628 | .init_irq = omap1_init_irq, | 628 | .init_irq = omap1_init_irq, |
629 | .handle_irq = omap1_handle_irq, | ||
629 | .init_machine = ams_delta_init, | 630 | .init_machine = ams_delta_init, |
630 | .init_late = ams_delta_init_late, | 631 | .init_late = ams_delta_init_late, |
631 | .init_time = omap1_timer_init, | 632 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 702d58039cc1..0fb51d22c8b5 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -362,6 +362,7 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample") | |||
362 | .map_io = omap_fsample_map_io, | 362 | .map_io = omap_fsample_map_io, |
363 | .init_early = omap1_init_early, | 363 | .init_early = omap1_init_early, |
364 | .init_irq = omap1_init_irq, | 364 | .init_irq = omap1_init_irq, |
365 | .handle_irq = omap1_handle_irq, | ||
365 | .init_machine = omap_fsample_init, | 366 | .init_machine = omap_fsample_init, |
366 | .init_late = omap1_init_late, | 367 | .init_late = omap1_init_late, |
367 | .init_time = omap1_timer_init, | 368 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index e1d9171774bc..9708629f8c5f 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c | |||
@@ -82,6 +82,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") | |||
82 | .map_io = omap16xx_map_io, | 82 | .map_io = omap16xx_map_io, |
83 | .init_early = omap1_init_early, | 83 | .init_early = omap1_init_early, |
84 | .init_irq = omap1_init_irq, | 84 | .init_irq = omap1_init_irq, |
85 | .handle_irq = omap1_handle_irq, | ||
85 | .init_machine = omap_generic_init, | 86 | .init_machine = omap_generic_init, |
86 | .init_late = omap1_init_late, | 87 | .init_late = omap1_init_late, |
87 | .init_time = omap1_timer_init, | 88 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 5b45d266d83e..8340d684d8b6 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -426,6 +426,7 @@ MACHINE_START(OMAP_H2, "TI-H2") | |||
426 | .map_io = omap16xx_map_io, | 426 | .map_io = omap16xx_map_io, |
427 | .init_early = omap1_init_early, | 427 | .init_early = omap1_init_early, |
428 | .init_irq = omap1_init_irq, | 428 | .init_irq = omap1_init_irq, |
429 | .handle_irq = omap1_handle_irq, | ||
429 | .init_machine = h2_init, | 430 | .init_machine = h2_init, |
430 | .init_late = omap1_init_late, | 431 | .init_late = omap1_init_late, |
431 | .init_time = omap1_timer_init, | 432 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index bfed4f928663..086ff34e072b 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -452,6 +452,7 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") | |||
452 | .map_io = omap16xx_map_io, | 452 | .map_io = omap16xx_map_io, |
453 | .init_early = omap1_init_early, | 453 | .init_early = omap1_init_early, |
454 | .init_irq = omap1_init_irq, | 454 | .init_irq = omap1_init_irq, |
455 | .handle_irq = omap1_handle_irq, | ||
455 | .init_machine = h3_init, | 456 | .init_machine = h3_init, |
456 | .init_late = omap1_init_late, | 457 | .init_late = omap1_init_late, |
457 | .init_time = omap1_timer_init, | 458 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 35a2379b986f..9525ef9bc6c0 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
@@ -601,6 +601,7 @@ MACHINE_START(HERALD, "HTC Herald") | |||
601 | .map_io = htcherald_map_io, | 601 | .map_io = htcherald_map_io, |
602 | .init_early = omap1_init_early, | 602 | .init_early = omap1_init_early, |
603 | .init_irq = omap1_init_irq, | 603 | .init_irq = omap1_init_irq, |
604 | .handle_irq = omap1_handle_irq, | ||
604 | .init_machine = htcherald_init, | 605 | .init_machine = htcherald_init, |
605 | .init_late = omap1_init_late, | 606 | .init_late = omap1_init_late, |
606 | .init_time = omap1_timer_init, | 607 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index c49ce83cc1eb..ed4e045c2ad8 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -456,6 +456,7 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") | |||
456 | .map_io = innovator_map_io, | 456 | .map_io = innovator_map_io, |
457 | .init_early = omap1_init_early, | 457 | .init_early = omap1_init_early, |
458 | .init_irq = omap1_init_irq, | 458 | .init_irq = omap1_init_irq, |
459 | .handle_irq = omap1_handle_irq, | ||
459 | .init_machine = innovator_init, | 460 | .init_machine = innovator_init, |
460 | .init_late = omap1_init_late, | 461 | .init_late = omap1_init_late, |
461 | .init_time = omap1_timer_init, | 462 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 85089d821982..9f6c7af3a4e7 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -294,6 +294,7 @@ MACHINE_START(NOKIA770, "Nokia 770") | |||
294 | .map_io = omap16xx_map_io, | 294 | .map_io = omap16xx_map_io, |
295 | .init_early = omap1_init_early, | 295 | .init_early = omap1_init_early, |
296 | .init_irq = omap1_init_irq, | 296 | .init_irq = omap1_init_irq, |
297 | .handle_irq = omap1_handle_irq, | ||
297 | .init_machine = omap_nokia770_init, | 298 | .init_machine = omap_nokia770_init, |
298 | .init_late = omap1_init_late, | 299 | .init_late = omap1_init_late, |
299 | .init_time = omap1_timer_init, | 300 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 7436d4cf6596..0efd165b8227 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -610,6 +610,7 @@ MACHINE_START(OMAP_OSK, "TI-OSK") | |||
610 | .map_io = omap16xx_map_io, | 610 | .map_io = omap16xx_map_io, |
611 | .init_early = omap1_init_early, | 611 | .init_early = omap1_init_early, |
612 | .init_irq = omap1_init_irq, | 612 | .init_irq = omap1_init_irq, |
613 | .handle_irq = omap1_handle_irq, | ||
613 | .init_machine = osk_init, | 614 | .init_machine = osk_init, |
614 | .init_late = omap1_init_late, | 615 | .init_late = omap1_init_late, |
615 | .init_time = omap1_timer_init, | 616 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 3b8e98f4353c..1142ae431fe0 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -235,6 +235,7 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") | |||
235 | .map_io = omap15xx_map_io, | 235 | .map_io = omap15xx_map_io, |
236 | .init_early = omap1_init_early, | 236 | .init_early = omap1_init_early, |
237 | .init_irq = omap1_init_irq, | 237 | .init_irq = omap1_init_irq, |
238 | .handle_irq = omap1_handle_irq, | ||
238 | .init_machine = omap_palmte_init, | 239 | .init_machine = omap_palmte_init, |
239 | .init_late = omap1_init_late, | 240 | .init_late = omap1_init_late, |
240 | .init_time = omap1_timer_init, | 241 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index ca501208825f..54a547a96950 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -282,6 +282,7 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T") | |||
282 | .map_io = omap15xx_map_io, | 282 | .map_io = omap15xx_map_io, |
283 | .init_early = omap1_init_early, | 283 | .init_early = omap1_init_early, |
284 | .init_irq = omap1_init_irq, | 284 | .init_irq = omap1_init_irq, |
285 | .handle_irq = omap1_handle_irq, | ||
285 | .init_machine = omap_palmtt_init, | 286 | .init_machine = omap_palmtt_init, |
286 | .init_late = omap1_init_late, | 287 | .init_late = omap1_init_late, |
287 | .init_time = omap1_timer_init, | 288 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index 470e12d67360..87ec04ae40dd 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -297,6 +297,7 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71") | |||
297 | .map_io = omap15xx_map_io, | 297 | .map_io = omap15xx_map_io, |
298 | .init_early = omap1_init_early, | 298 | .init_early = omap1_init_early, |
299 | .init_irq = omap1_init_irq, | 299 | .init_irq = omap1_init_irq, |
300 | .handle_irq = omap1_handle_irq, | ||
300 | .init_machine = omap_palmz71_init, | 301 | .init_machine = omap_palmz71_init, |
301 | .init_late = omap1_init_late, | 302 | .init_late = omap1_init_late, |
302 | .init_time = omap1_timer_init, | 303 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 8b2f7127f716..3d76f05407f0 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -324,6 +324,7 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") | |||
324 | .map_io = omap_perseus2_map_io, | 324 | .map_io = omap_perseus2_map_io, |
325 | .init_early = omap1_init_early, | 325 | .init_early = omap1_init_early, |
326 | .init_irq = omap1_init_irq, | 326 | .init_irq = omap1_init_irq, |
327 | .handle_irq = omap1_handle_irq, | ||
327 | .init_machine = omap_perseus2_init, | 328 | .init_machine = omap_perseus2_init, |
328 | .init_late = omap1_init_late, | 329 | .init_late = omap1_init_late, |
329 | .init_time = omap1_timer_init, | 330 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 29e526235dc2..939991ea33d5 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -343,6 +343,7 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1") | |||
343 | .map_io = omap15xx_map_io, | 343 | .map_io = omap15xx_map_io, |
344 | .init_early = omap1_init_early, | 344 | .init_early = omap1_init_early, |
345 | .init_irq = omap1_init_irq, | 345 | .init_irq = omap1_init_irq, |
346 | .handle_irq = omap1_handle_irq, | ||
346 | .init_machine = omap_sx1_init, | 347 | .init_machine = omap_sx1_init, |
347 | .init_late = omap1_init_late, | 348 | .init_late = omap1_init_late, |
348 | .init_time = omap1_timer_init, | 349 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 4677a9ccb3cb..e960687d0cb1 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -288,6 +288,7 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") | |||
288 | .map_io = omap15xx_map_io, | 288 | .map_io = omap15xx_map_io, |
289 | .init_early = omap1_init_early, | 289 | .init_early = omap1_init_early, |
290 | .init_irq = omap1_init_irq, | 290 | .init_irq = omap1_init_irq, |
291 | .handle_irq = omap1_handle_irq, | ||
291 | .init_machine = voiceblue_init, | 292 | .init_machine = voiceblue_init, |
292 | .init_late = omap1_init_late, | 293 | .init_late = omap1_init_late, |
293 | .init_time = omap1_timer_init, | 294 | .init_time = omap1_timer_init, |
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index 732f8ee2fcd2..6363e0cc41f1 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/i2c-omap.h> | 30 | #include <linux/i2c-omap.h> |
31 | #include <linux/reboot.h> | 31 | #include <linux/reboot.h> |
32 | 32 | ||
33 | #include <asm/exception.h> | ||
34 | |||
33 | #include <plat/i2c.h> | 35 | #include <plat/i2c.h> |
34 | 36 | ||
35 | #include <mach/irqs.h> | 37 | #include <mach/irqs.h> |
@@ -73,6 +75,7 @@ static inline int omap_serial_wakeup_init(void) | |||
73 | 75 | ||
74 | void omap1_init_early(void); | 76 | void omap1_init_early(void); |
75 | void omap1_init_irq(void); | 77 | void omap1_init_irq(void); |
78 | void __exception_irq_entry omap1_handle_irq(struct pt_regs *regs); | ||
76 | void omap1_init_late(void); | 79 | void omap1_init_late(void); |
77 | void omap1_restart(enum reboot_mode, const char *); | 80 | void omap1_restart(enum reboot_mode, const char *); |
78 | 81 | ||
@@ -91,8 +94,6 @@ static inline int __init omap_32k_timer_init(void) | |||
91 | } | 94 | } |
92 | #endif | 95 | #endif |
93 | 96 | ||
94 | extern u32 omap_irq_flags; | ||
95 | |||
96 | #ifdef CONFIG_ARCH_OMAP16XX | 97 | #ifdef CONFIG_ARCH_OMAP16XX |
97 | extern int ocpi_enable(void); | 98 | extern int ocpi_enable(void); |
98 | #else | 99 | #else |
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S deleted file mode 100644 index 78a8c6c24764..000000000000 --- a/arch/arm/mach-omap1/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for OMAP-based platforms | ||
5 | * | ||
6 | * Copyright (C) 2009 Texas Instruments | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <mach/hardware.h> | ||
14 | #include <mach/irqs.h> | ||
15 | |||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
20 | ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE) | ||
21 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] | ||
22 | ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET] | ||
23 | mov \irqstat, #0xffffffff | ||
24 | bic \tmp, \irqstat, \tmp | ||
25 | tst \irqnr, \tmp | ||
26 | beq 1510f | ||
27 | |||
28 | ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET] | ||
29 | ldr \tmp, =omap_irq_flags @ irq flags address | ||
30 | ldr \tmp, [\tmp, #0] @ irq flags value | ||
31 | cmp \irqnr, #0 | ||
32 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | ||
33 | cmpeq \irqnr, \tmp | ||
34 | ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE) | ||
35 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | ||
36 | addeqs \irqnr, \irqnr, #32 | ||
37 | 1510: | ||
38 | .endm | ||
39 | |||
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 3651b17aeb10..567fba35bd94 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/io.h> | 43 | #include <linux/io.h> |
44 | 44 | ||
45 | #include <asm/irq.h> | 45 | #include <asm/irq.h> |
46 | #include <asm/exception.h> | ||
46 | #include <asm/mach/irq.h> | 47 | #include <asm/mach/irq.h> |
47 | 48 | ||
48 | #include "soc.h" | 49 | #include "soc.h" |
@@ -61,7 +62,7 @@ struct omap_irq_bank { | |||
61 | unsigned long wake_enable; | 62 | unsigned long wake_enable; |
62 | }; | 63 | }; |
63 | 64 | ||
64 | u32 omap_irq_flags; | 65 | static u32 omap_l2_irq; |
65 | static unsigned int irq_bank_count; | 66 | static unsigned int irq_bank_count; |
66 | static struct omap_irq_bank *irq_banks; | 67 | static struct omap_irq_bank *irq_banks; |
67 | static struct irq_domain *domain; | 68 | static struct irq_domain *domain; |
@@ -140,6 +141,36 @@ static struct omap_irq_bank omap1610_irq_banks[] = { | |||
140 | }; | 141 | }; |
141 | #endif | 142 | #endif |
142 | 143 | ||
144 | asmlinkage void __exception_irq_entry omap1_handle_irq(struct pt_regs *regs) | ||
145 | { | ||
146 | void __iomem *l1 = irq_banks[0].va; | ||
147 | void __iomem *l2 = irq_banks[1].va; | ||
148 | u32 irqnr; | ||
149 | |||
150 | do { | ||
151 | irqnr = readl_relaxed(l1 + IRQ_ITR_REG_OFFSET); | ||
152 | irqnr &= ~(readl_relaxed(l1 + IRQ_MIR_REG_OFFSET) & 0xffffffff); | ||
153 | if (!irqnr) | ||
154 | break; | ||
155 | |||
156 | irqnr = readl_relaxed(l1 + IRQ_SIR_FIQ_REG_OFFSET); | ||
157 | if (irqnr) | ||
158 | goto irq; | ||
159 | |||
160 | irqnr = readl_relaxed(l1 + IRQ_SIR_IRQ_REG_OFFSET); | ||
161 | if (irqnr == omap_l2_irq) { | ||
162 | irqnr = readl_relaxed(l2 + IRQ_SIR_IRQ_REG_OFFSET); | ||
163 | if (irqnr) | ||
164 | irqnr += 32; | ||
165 | } | ||
166 | irq: | ||
167 | if (irqnr) | ||
168 | handle_domain_irq(domain, irqnr, regs); | ||
169 | else | ||
170 | break; | ||
171 | } while (irqnr); | ||
172 | } | ||
173 | |||
143 | static __init void | 174 | static __init void |
144 | omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) | 175 | omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) |
145 | { | 176 | { |
@@ -167,26 +198,22 @@ void __init omap1_init_irq(void) | |||
167 | 198 | ||
168 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | 199 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) |
169 | if (cpu_is_omap7xx()) { | 200 | if (cpu_is_omap7xx()) { |
170 | omap_irq_flags = INT_7XX_IH2_IRQ; | ||
171 | irq_banks = omap7xx_irq_banks; | 201 | irq_banks = omap7xx_irq_banks; |
172 | irq_bank_count = ARRAY_SIZE(omap7xx_irq_banks); | 202 | irq_bank_count = ARRAY_SIZE(omap7xx_irq_banks); |
173 | } | 203 | } |
174 | #endif | 204 | #endif |
175 | #ifdef CONFIG_ARCH_OMAP15XX | 205 | #ifdef CONFIG_ARCH_OMAP15XX |
176 | if (cpu_is_omap1510()) { | 206 | if (cpu_is_omap1510()) { |
177 | omap_irq_flags = INT_1510_IH2_IRQ; | ||
178 | irq_banks = omap1510_irq_banks; | 207 | irq_banks = omap1510_irq_banks; |
179 | irq_bank_count = ARRAY_SIZE(omap1510_irq_banks); | 208 | irq_bank_count = ARRAY_SIZE(omap1510_irq_banks); |
180 | } | 209 | } |
181 | if (cpu_is_omap310()) { | 210 | if (cpu_is_omap310()) { |
182 | omap_irq_flags = INT_1510_IH2_IRQ; | ||
183 | irq_banks = omap310_irq_banks; | 211 | irq_banks = omap310_irq_banks; |
184 | irq_bank_count = ARRAY_SIZE(omap310_irq_banks); | 212 | irq_bank_count = ARRAY_SIZE(omap310_irq_banks); |
185 | } | 213 | } |
186 | #endif | 214 | #endif |
187 | #if defined(CONFIG_ARCH_OMAP16XX) | 215 | #if defined(CONFIG_ARCH_OMAP16XX) |
188 | if (cpu_is_omap16xx()) { | 216 | if (cpu_is_omap16xx()) { |
189 | omap_irq_flags = INT_1510_IH2_IRQ; | ||
190 | irq_banks = omap1610_irq_banks; | 217 | irq_banks = omap1610_irq_banks; |
191 | irq_bank_count = ARRAY_SIZE(omap1610_irq_banks); | 218 | irq_bank_count = ARRAY_SIZE(omap1610_irq_banks); |
192 | } | 219 | } |
@@ -205,6 +232,7 @@ void __init omap1_init_irq(void) | |||
205 | pr_warn("Couldn't allocate IRQ numbers\n"); | 232 | pr_warn("Couldn't allocate IRQ numbers\n"); |
206 | irq_base = 0; | 233 | irq_base = 0; |
207 | } | 234 | } |
235 | omap_l2_irq = cpu_is_omap7xx() ? irq_base + 1 : irq_base; | ||
208 | 236 | ||
209 | domain = irq_domain_add_legacy(NULL, nr_irqs, irq_base, 0, | 237 | domain = irq_domain_add_legacy(NULL, nr_irqs, irq_base, 0, |
210 | &irq_domain_simple_ops, NULL); | 238 | &irq_domain_simple_ops, NULL); |
@@ -239,7 +267,7 @@ void __init omap1_init_irq(void) | |||
239 | } | 267 | } |
240 | 268 | ||
241 | /* Unmask level 2 handler */ | 269 | /* Unmask level 2 handler */ |
242 | d = irq_get_irq_data(omap_irq_flags); | 270 | d = irq_get_irq_data(irq_find_mapping(domain, omap_l2_irq)); |
243 | if (d) { | 271 | if (d) { |
244 | ct = irq_data_get_chip_type(d); | 272 | ct = irq_data_get_chip_type(d); |
245 | ct->chip.irq_unmask(d); | 273 | ct->chip.irq_unmask(d); |