diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2011-05-30 06:04:53 -0400 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2011-11-15 13:14:00 -0500 |
commit | 4e44d2cb95bd93abe16a131dbcd4c052ae36665f (patch) | |
tree | a2ed99b4ca08bdf22f1f025efd796409b149d06e | |
parent | 041f777c93bab29565d999a292b9b9b533fe6f5e (diff) |
ARM: exynos4: convert to CONFIG_MULTI_IRQ_HANDLER
Convert the Exynos4 platforms to be using the gic_handle_irq
function as their primary interrupt handler.
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-exynos/cpu.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-exynos/include/mach/entry-macro.S | 75 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-armlex4210.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-nuri.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-origen.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-smdk4x12.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-smdkv310.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-universal_c210.c | 4 |
9 files changed, 18 insertions, 78 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 8f39263c0768..d897255bcdf5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -854,6 +854,7 @@ config ARCH_EXYNOS | |||
854 | select HAVE_S3C2410_I2C if I2C | 854 | select HAVE_S3C2410_I2C if I2C |
855 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 855 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
856 | select NEED_MACH_MEMORY_H | 856 | select NEED_MACH_MEMORY_H |
857 | select MULTI_IRQ_HANDLER | ||
857 | help | 858 | help |
858 | Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) | 859 | Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) |
859 | 860 | ||
diff --git a/arch/arm/mach-exynos/cpu.c b/arch/arm/mach-exynos/cpu.c index e92e464bdbba..6e34485caa36 100644 --- a/arch/arm/mach-exynos/cpu.c +++ b/arch/arm/mach-exynos/cpu.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/mach/irq.h> | 15 | #include <asm/mach/irq.h> |
16 | 16 | ||
17 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
18 | #include <asm/exception.h> | ||
18 | #include <asm/hardware/cache-l2x0.h> | 19 | #include <asm/hardware/cache-l2x0.h> |
19 | #include <asm/hardware/gic.h> | 20 | #include <asm/hardware/gic.h> |
20 | 21 | ||
@@ -33,8 +34,6 @@ | |||
33 | #include <mach/regs-irq.h> | 34 | #include <mach/regs-irq.h> |
34 | #include <mach/regs-pmu.h> | 35 | #include <mach/regs-pmu.h> |
35 | 36 | ||
36 | unsigned int gic_bank_offset __read_mostly; | ||
37 | |||
38 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, | 37 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, |
39 | unsigned int irq_start); | 38 | unsigned int irq_start); |
40 | extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq); | 39 | extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq); |
@@ -210,6 +209,7 @@ void __init exynos4_init_clocks(int xtal) | |||
210 | void __init exynos4_init_irq(void) | 209 | void __init exynos4_init_irq(void) |
211 | { | 210 | { |
212 | int irq; | 211 | int irq; |
212 | unsigned int bank_offset; | ||
213 | 213 | ||
214 | gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; | 214 | gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; |
215 | 215 | ||
diff --git a/arch/arm/mach-exynos/include/mach/entry-macro.S b/arch/arm/mach-exynos/include/mach/entry-macro.S index f5e9fd8e37b4..3ba4f547534b 100644 --- a/arch/arm/mach-exynos/include/mach/entry-macro.S +++ b/arch/arm/mach-exynos/include/mach/entry-macro.S | |||
@@ -9,83 +9,8 @@ | |||
9 | * warranty of any kind, whether express or implied. | 9 | * warranty of any kind, whether express or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <mach/hardware.h> | ||
13 | #include <mach/map.h> | ||
14 | #include <asm/hardware/gic.h> | ||
15 | |||
16 | .macro disable_fiq | 12 | .macro disable_fiq |
17 | .endm | 13 | .endm |
18 | 14 | ||
19 | .macro get_irqnr_preamble, base, tmp | ||
20 | mov \tmp, #0 | ||
21 | |||
22 | mrc p15, 0, \base, c0, c0, 5 | ||
23 | and \base, \base, #3 | ||
24 | cmp \base, #0 | ||
25 | beq 1f | ||
26 | |||
27 | ldr \tmp, =gic_bank_offset | ||
28 | ldr \tmp, [\tmp] | ||
29 | cmp \base, #1 | ||
30 | beq 1f | ||
31 | |||
32 | cmp \base, #2 | ||
33 | addeq \tmp, \tmp, \tmp | ||
34 | addne \tmp, \tmp, \tmp, LSL #1 | ||
35 | |||
36 | 1: ldr \base, =gic_cpu_base_addr | ||
37 | ldr \base, [\base] | ||
38 | add \base, \base, \tmp | ||
39 | .endm | ||
40 | |||
41 | .macro arch_ret_to_user, tmp1, tmp2 | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
42 | .endm | 16 | .endm |
43 | |||
44 | /* | ||
45 | * The interrupt numbering scheme is defined in the | ||
46 | * interrupt controller spec. To wit: | ||
47 | * | ||
48 | * Interrupts 0-15 are IPI | ||
49 | * 16-28 are reserved | ||
50 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
51 | * 32-1020 are global | ||
52 | * 1021-1022 are reserved | ||
53 | * 1023 is "spurious" (no interrupt) | ||
54 | * | ||
55 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
56 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
57 | * | ||
58 | * A simple read from the controller will tell us the number of the highest | ||
59 | * priority enabled interrupt. We then just need to check whether it is in the | ||
60 | * valid range for an IRQ (30-1020 inclusive). | ||
61 | */ | ||
62 | |||
63 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
64 | |||
65 | ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */ | ||
66 | |||
67 | ldr \tmp, =1021 | ||
68 | |||
69 | bic \irqnr, \irqstat, #0x1c00 | ||
70 | |||
71 | cmp \irqnr, #15 | ||
72 | cmpcc \irqnr, \irqnr | ||
73 | cmpne \irqnr, \tmp | ||
74 | cmpcs \irqnr, \irqnr | ||
75 | addne \irqnr, \irqnr, #32 | ||
76 | |||
77 | .endm | ||
78 | |||
79 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
80 | * register) is preserved from the macro above. | ||
81 | * If there is an IPI, we immediately signal end of interrupt on the | ||
82 | * controller, since this requires the original irqstat value which | ||
83 | * we won't easily be able to recreate later. | ||
84 | */ | ||
85 | |||
86 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
87 | bic \irqnr, \irqstat, #0x1c00 | ||
88 | cmp \irqnr, #16 | ||
89 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
90 | cmpcs \irqnr, \irqnr | ||
91 | .endm | ||
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c index f0ca6c157d29..49da3089249a 100644 --- a/arch/arm/mach-exynos/mach-armlex4210.c +++ b/arch/arm/mach-exynos/mach-armlex4210.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/smsc911x.h> | 16 | #include <linux/smsc911x.h> |
17 | 17 | ||
18 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
19 | #include <asm/hardware/gic.h> | ||
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | 21 | ||
21 | #include <plat/cpu.h> | 22 | #include <plat/cpu.h> |
@@ -210,6 +211,7 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") | |||
210 | .atag_offset = 0x100, | 211 | .atag_offset = 0x100, |
211 | .init_irq = exynos4_init_irq, | 212 | .init_irq = exynos4_init_irq, |
212 | .map_io = armlex4210_map_io, | 213 | .map_io = armlex4210_map_io, |
214 | .handle_irq = gic_handle_irq, | ||
213 | .init_machine = armlex4210_machine_init, | 215 | .init_machine = armlex4210_machine_init, |
214 | .timer = &exynos4_timer, | 216 | .timer = &exynos4_timer, |
215 | MACHINE_END | 217 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 236bbe187163..5acec11821a4 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <media/v4l2-mediabus.h> | 32 | #include <media/v4l2-mediabus.h> |
33 | 33 | ||
34 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
35 | #include <asm/hardware/gic.h> | ||
35 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
36 | 37 | ||
37 | #include <plat/adc.h> | 38 | #include <plat/adc.h> |
@@ -1333,6 +1334,7 @@ MACHINE_START(NURI, "NURI") | |||
1333 | .atag_offset = 0x100, | 1334 | .atag_offset = 0x100, |
1334 | .init_irq = exynos4_init_irq, | 1335 | .init_irq = exynos4_init_irq, |
1335 | .map_io = nuri_map_io, | 1336 | .map_io = nuri_map_io, |
1337 | .handle_irq = gic_handle_irq, | ||
1336 | .init_machine = nuri_machine_init, | 1338 | .init_machine = nuri_machine_init, |
1337 | .timer = &exynos4_timer, | 1339 | .timer = &exynos4_timer, |
1338 | .reserve = &nuri_reserve, | 1340 | .reserve = &nuri_reserve, |
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index f80b563f2be7..5561b06c38ec 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/lcd.h> | 22 | #include <linux/lcd.h> |
23 | 23 | ||
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/hardware/gic.h> | ||
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | 27 | ||
27 | #include <video/platform_lcd.h> | 28 | #include <video/platform_lcd.h> |
@@ -694,6 +695,7 @@ MACHINE_START(ORIGEN, "ORIGEN") | |||
694 | .atag_offset = 0x100, | 695 | .atag_offset = 0x100, |
695 | .init_irq = exynos4_init_irq, | 696 | .init_irq = exynos4_init_irq, |
696 | .map_io = origen_map_io, | 697 | .map_io = origen_map_io, |
698 | .handle_irq = gic_handle_irq, | ||
697 | .init_machine = origen_machine_init, | 699 | .init_machine = origen_machine_init, |
698 | .timer = &exynos4_timer, | 700 | .timer = &exynos4_timer, |
699 | .reserve = &origen_reserve, | 701 | .reserve = &origen_reserve, |
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index fcf2e0e23d53..722d82d7f217 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
22 | 22 | ||
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/hardware/gic.h> | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | 26 | ||
26 | #include <plat/backlight.h> | 27 | #include <plat/backlight.h> |
@@ -287,6 +288,7 @@ MACHINE_START(SMDK4212, "SMDK4212") | |||
287 | .atag_offset = 0x100, | 288 | .atag_offset = 0x100, |
288 | .init_irq = exynos4_init_irq, | 289 | .init_irq = exynos4_init_irq, |
289 | .map_io = smdk4x12_map_io, | 290 | .map_io = smdk4x12_map_io, |
291 | .handle_irq = gic_handle_irq, | ||
290 | .init_machine = smdk4x12_machine_init, | 292 | .init_machine = smdk4x12_machine_init, |
291 | .timer = &exynos4_timer, | 293 | .timer = &exynos4_timer, |
292 | MACHINE_END | 294 | MACHINE_END |
@@ -297,6 +299,7 @@ MACHINE_START(SMDK4412, "SMDK4412") | |||
297 | .atag_offset = 0x100, | 299 | .atag_offset = 0x100, |
298 | .init_irq = exynos4_init_irq, | 300 | .init_irq = exynos4_init_irq, |
299 | .map_io = smdk4x12_map_io, | 301 | .map_io = smdk4x12_map_io, |
302 | .handle_irq = gic_handle_irq, | ||
300 | .init_machine = smdk4x12_machine_init, | 303 | .init_machine = smdk4x12_machine_init, |
301 | .timer = &exynos4_timer, | 304 | .timer = &exynos4_timer, |
302 | MACHINE_END | 305 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index cec2afabe7b4..edc60b6108ed 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pwm_backlight.h> | 21 | #include <linux/pwm_backlight.h> |
22 | 22 | ||
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/hardware/gic.h> | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | 26 | ||
26 | #include <video/platform_lcd.h> | 27 | #include <video/platform_lcd.h> |
@@ -375,6 +376,7 @@ MACHINE_START(SMDKV310, "SMDKV310") | |||
375 | .atag_offset = 0x100, | 376 | .atag_offset = 0x100, |
376 | .init_irq = exynos4_init_irq, | 377 | .init_irq = exynos4_init_irq, |
377 | .map_io = smdkv310_map_io, | 378 | .map_io = smdkv310_map_io, |
379 | .handle_irq = gic_handle_irq, | ||
378 | .init_machine = smdkv310_machine_init, | 380 | .init_machine = smdkv310_machine_init, |
379 | .timer = &exynos4_timer, | 381 | .timer = &exynos4_timer, |
380 | .reserve = &smdkv310_reserve, | 382 | .reserve = &smdkv310_reserve, |
@@ -385,6 +387,7 @@ MACHINE_START(SMDKC210, "SMDKC210") | |||
385 | .atag_offset = 0x100, | 387 | .atag_offset = 0x100, |
386 | .init_irq = exynos4_init_irq, | 388 | .init_irq = exynos4_init_irq, |
387 | .map_io = smdkv310_map_io, | 389 | .map_io = smdkv310_map_io, |
390 | .handle_irq = gic_handle_irq, | ||
388 | .init_machine = smdkv310_machine_init, | 391 | .init_machine = smdkv310_machine_init, |
389 | .timer = &exynos4_timer, | 392 | .timer = &exynos4_timer, |
390 | MACHINE_END | 393 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index a2a177ff4b44..48e85b03cb16 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -21,9 +21,10 @@ | |||
21 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
22 | #include <linux/i2c-gpio.h> | 22 | #include <linux/i2c-gpio.h> |
23 | #include <linux/i2c/mcs.h> | 23 | #include <linux/i2c/mcs.h> |
24 | #include <linux/i2c/atmel_mxt_ts.h> | 24 | <linux/i2c/atmel_mxt_ts.h> |
25 | 25 | ||
26 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
27 | #include <asm/hardware/gic.h> | ||
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | 29 | ||
29 | #include <plat/regs-serial.h> | 30 | #include <plat/regs-serial.h> |
@@ -1058,6 +1059,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") | |||
1058 | .atag_offset = 0x100, | 1059 | .atag_offset = 0x100, |
1059 | .init_irq = exynos4_init_irq, | 1060 | .init_irq = exynos4_init_irq, |
1060 | .map_io = universal_map_io, | 1061 | .map_io = universal_map_io, |
1062 | .handle_irq = gic_handle_irq, | ||
1061 | .init_machine = universal_machine_init, | 1063 | .init_machine = universal_machine_init, |
1062 | .timer = &exynos4_timer, | 1064 | .timer = &exynos4_timer, |
1063 | .reserve = &universal_reserve, | 1065 | .reserve = &universal_reserve, |