diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2013-01-18 10:31:37 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-03-26 12:11:43 -0400 |
commit | de88cbb7b244f3bcd61d49fd6dec35c19192545a (patch) | |
tree | 790dff780e6bcdf2c9e71baa7beb92102ec99526 /arch | |
parent | f36a3bb1a1b73a60f4df1d4c38c686cc173f50b3 (diff) |
arm: Move chained_irq_(enter|exit) to a generic file
These functions have been introduced by commit 10a8c383 (irq: introduce
entry and exit functions for chained handlers) in asm/mach/irq.h. This
patch moves them to linux/irqchip/chained_irq.h so that generic irqchip
drivers do not rely on architecture specific header files.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/mach/irq.h | 31 | ||||
-rw-r--r-- | arch/arm/mach-at91/gpio.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-exynos/common.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/irq.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/irq-vic-timer.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-samsung/s5p-irq-gpioint.c | 3 |
6 files changed, 5 insertions, 37 deletions
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h index 749d5052fbb7..2092ee1e1300 100644 --- a/arch/arm/include/asm/mach/irq.h +++ b/arch/arm/include/asm/mach/irq.h | |||
@@ -30,35 +30,4 @@ do { \ | |||
30 | raw_spin_unlock(&desc->lock); \ | 30 | raw_spin_unlock(&desc->lock); \ |
31 | } while(0) | 31 | } while(0) |
32 | 32 | ||
33 | #ifndef __ASSEMBLY__ | ||
34 | /* | ||
35 | * Entry/exit functions for chained handlers where the primary IRQ chip | ||
36 | * may implement either fasteoi or level-trigger flow control. | ||
37 | */ | ||
38 | static inline void chained_irq_enter(struct irq_chip *chip, | ||
39 | struct irq_desc *desc) | ||
40 | { | ||
41 | /* FastEOI controllers require no action on entry. */ | ||
42 | if (chip->irq_eoi) | ||
43 | return; | ||
44 | |||
45 | if (chip->irq_mask_ack) { | ||
46 | chip->irq_mask_ack(&desc->irq_data); | ||
47 | } else { | ||
48 | chip->irq_mask(&desc->irq_data); | ||
49 | if (chip->irq_ack) | ||
50 | chip->irq_ack(&desc->irq_data); | ||
51 | } | ||
52 | } | ||
53 | |||
54 | static inline void chained_irq_exit(struct irq_chip *chip, | ||
55 | struct irq_desc *desc) | ||
56 | { | ||
57 | if (chip->irq_eoi) | ||
58 | chip->irq_eoi(&desc->irq_data); | ||
59 | else | ||
60 | chip->irq_unmask(&desc->irq_data); | ||
61 | } | ||
62 | #endif | ||
63 | |||
64 | #endif | 33 | #endif |
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index c5d7e1e9d757..a5afcf76550e 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -22,10 +22,9 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/irqdomain.h> | 24 | #include <linux/irqdomain.h> |
25 | #include <linux/irqchip/chained_irq.h> | ||
25 | #include <linux/of_address.h> | 26 | #include <linux/of_address.h> |
26 | 27 | ||
27 | #include <asm/mach/irq.h> | ||
28 | |||
29 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
30 | #include <mach/at91_pio.h> | 29 | #include <mach/at91_pio.h> |
31 | 30 | ||
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index d63d399c7bae..7bc0f9aa8b33 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/irqchip.h> | 26 | #include <linux/irqchip.h> |
27 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
28 | #include <linux/irqchip/arm-gic.h> | 28 | #include <linux/irqchip/arm-gic.h> |
29 | #include <linux/irqchip/chained_irq.h> | ||
29 | 30 | ||
30 | #include <asm/proc-fns.h> | 31 | #include <asm/proc-fns.h> |
31 | #include <asm/exception.h> | 32 | #include <asm/exception.h> |
diff --git a/arch/arm/mach-s3c24xx/irq.c b/arch/arm/mach-s3c24xx/irq.c index cb9f5e011e73..b6fac28a0034 100644 --- a/arch/arm/mach-s3c24xx/irq.c +++ b/arch/arm/mach-s3c24xx/irq.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
27 | #include <linux/irqdomain.h> | 27 | #include <linux/irqdomain.h> |
28 | #include <linux/irqchip/chained_irq.h> | ||
28 | 29 | ||
29 | #include <asm/mach/irq.h> | 30 | #include <asm/mach/irq.h> |
30 | 31 | ||
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c index f980cf3d2baa..5d205e74e495 100644 --- a/arch/arm/plat-samsung/irq-vic-timer.c +++ b/arch/arm/plat-samsung/irq-vic-timer.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/irqchip/chained_irq.h> | ||
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
20 | 21 | ||
21 | #include <mach/map.h> | 22 | #include <mach/map.h> |
@@ -23,8 +24,6 @@ | |||
23 | #include <plat/irq-vic-timer.h> | 24 | #include <plat/irq-vic-timer.h> |
24 | #include <plat/regs-timer.h> | 25 | #include <plat/regs-timer.h> |
25 | 26 | ||
26 | #include <asm/mach/irq.h> | ||
27 | |||
28 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) | 27 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) |
29 | { | 28 | { |
30 | struct irq_chip *chip = irq_get_chip(irq); | 29 | struct irq_chip *chip = irq_get_chip(irq); |
diff --git a/arch/arm/plat-samsung/s5p-irq-gpioint.c b/arch/arm/plat-samsung/s5p-irq-gpioint.c index bae56131a50a..fafdb059043a 100644 --- a/arch/arm/plat-samsung/s5p-irq-gpioint.c +++ b/arch/arm/plat-samsung/s5p-irq-gpioint.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/irqchip/chained_irq.h> | ||
17 | #include <linux/io.h> | 18 | #include <linux/io.h> |
18 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
19 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
@@ -22,8 +23,6 @@ | |||
22 | #include <plat/gpio-core.h> | 23 | #include <plat/gpio-core.h> |
23 | #include <plat/gpio-cfg.h> | 24 | #include <plat/gpio-cfg.h> |
24 | 25 | ||
25 | #include <asm/mach/irq.h> | ||
26 | |||
27 | #define GPIO_BASE(chip) ((void __iomem *)((unsigned long)((chip)->base) & 0xFFFFF000u)) | 26 | #define GPIO_BASE(chip) ((void __iomem *)((unsigned long)((chip)->base) & 0xFFFFF000u)) |
28 | 27 | ||
29 | #define CON_OFFSET 0x700 | 28 | #define CON_OFFSET 0x700 |