aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/include/asm/mach/irq.h31
-rw-r--r--arch/arm/mach-at91/gpio.c3
-rw-r--r--arch/arm/mach-exynos/common.c1
-rw-r--r--arch/arm/mach-s3c24xx/irq.c1
-rw-r--r--arch/arm/plat-samsung/irq-vic-timer.c3
-rw-r--r--arch/arm/plat-samsung/s5p-irq-gpioint.c3
-rw-r--r--drivers/gpio/gpio-msm-v2.c3
-rw-r--r--drivers/gpio/gpio-mxc.c2
-rw-r--r--drivers/gpio/gpio-omap.c3
-rw-r--r--drivers/gpio/gpio-pl061.c2
-rw-r--r--drivers/gpio/gpio-pxa.c3
-rw-r--r--drivers/gpio/gpio-tegra.c3
-rw-r--r--drivers/irqchip/exynos-combiner.c1
-rw-r--r--drivers/irqchip/irq-gic.c1
-rw-r--r--drivers/pinctrl/pinctrl-at91.c3
-rw-r--r--drivers/pinctrl/pinctrl-exynos.c3
-rw-r--r--drivers/pinctrl/pinctrl-nomadik.c2
-rw-r--r--drivers/pinctrl/pinctrl-sirf.c2
-rw-r--r--drivers/pinctrl/spear/pinctrl-plgpio.c2
-rw-r--r--drivers/staging/imx-drm/ipu-v3/ipu-common.c2
-rw-r--r--include/linux/irqchip/chained_irq.h52
21 files changed, 71 insertions, 55 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 */
38static 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
54static 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
28static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) 27static 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
diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c
index 55a7e7769af6..dd2eddeb1e0c 100644
--- a/drivers/gpio/gpio-msm-v2.c
+++ b/drivers/gpio/gpio-msm-v2.c
@@ -23,13 +23,12 @@
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/irqchip/chained_irq.h>
26#include <linux/irq.h> 27#include <linux/irq.h>
27#include <linux/module.h> 28#include <linux/module.h>
28#include <linux/platform_device.h> 29#include <linux/platform_device.h>
29#include <linux/spinlock.h> 30#include <linux/spinlock.h>
30 31
31#include <asm/mach/irq.h>
32
33#include <mach/msm_gpiomux.h> 32#include <mach/msm_gpiomux.h>
34#include <mach/msm_iomap.h> 33#include <mach/msm_iomap.h>
35 34
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 7877335c4cc8..7176743915d3 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -24,6 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/irq.h> 25#include <linux/irq.h>
26#include <linux/irqdomain.h> 26#include <linux/irqdomain.h>
27#include <linux/irqchip/chained_irq.h>
27#include <linux/gpio.h> 28#include <linux/gpio.h>
28#include <linux/platform_device.h> 29#include <linux/platform_device.h>
29#include <linux/slab.h> 30#include <linux/slab.h>
@@ -32,7 +33,6 @@
32#include <linux/of_device.h> 33#include <linux/of_device.h>
33#include <linux/module.h> 34#include <linux/module.h>
34#include <asm-generic/bug.h> 35#include <asm-generic/bug.h>
35#include <asm/mach/irq.h>
36 36
37enum mxc_gpio_hwtype { 37enum mxc_gpio_hwtype {
38 IMX1_GPIO, /* runs on i.mx1 */ 38 IMX1_GPIO, /* runs on i.mx1 */
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 159f5c57eb45..a612ea1c53cb 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -25,11 +25,10 @@
25#include <linux/of.h> 25#include <linux/of.h>
26#include <linux/of_device.h> 26#include <linux/of_device.h>
27#include <linux/irqdomain.h> 27#include <linux/irqdomain.h>
28#include <linux/irqchip/chained_irq.h>
28#include <linux/gpio.h> 29#include <linux/gpio.h>
29#include <linux/platform_data/gpio-omap.h> 30#include <linux/platform_data/gpio-omap.h>
30 31
31#include <asm/mach/irq.h>
32
33#define OFF_MODE 1 32#define OFF_MODE 1
34 33
35static LIST_HEAD(omap_gpio_list); 34static LIST_HEAD(omap_gpio_list);
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index b820869ca93c..29763361d13c 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -15,6 +15,7 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/ioport.h> 16#include <linux/ioport.h>
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/irqchip/chained_irq.h>
18#include <linux/bitops.h> 19#include <linux/bitops.h>
19#include <linux/workqueue.h> 20#include <linux/workqueue.h>
20#include <linux/gpio.h> 21#include <linux/gpio.h>
@@ -23,7 +24,6 @@
23#include <linux/amba/pl061.h> 24#include <linux/amba/pl061.h>
24#include <linux/slab.h> 25#include <linux/slab.h>
25#include <linux/pm.h> 26#include <linux/pm.h>
26#include <asm/mach/irq.h>
27 27
28#define GPIODIR 0x400 28#define GPIODIR 0x400
29#define GPIOIS 0x404 29#define GPIOIS 0x404
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 9cc108d2b770..7523b6d108d0 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -19,6 +19,7 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/irqdomain.h> 21#include <linux/irqdomain.h>
22#include <linux/irqchip/chained_irq.h>
22#include <linux/io.h> 23#include <linux/io.h>
23#include <linux/of.h> 24#include <linux/of.h>
24#include <linux/of_device.h> 25#include <linux/of_device.h>
@@ -26,8 +27,6 @@
26#include <linux/syscore_ops.h> 27#include <linux/syscore_ops.h>
27#include <linux/slab.h> 28#include <linux/slab.h>
28 29
29#include <asm/mach/irq.h>
30
31#include <mach/irqs.h> 30#include <mach/irqs.h>
32 31
33/* 32/*
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 414ad912232f..8e2155548888 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -27,11 +27,10 @@
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/irqdomain.h> 29#include <linux/irqdomain.h>
30#include <linux/irqchip/chained_irq.h>
30#include <linux/pinctrl/consumer.h> 31#include <linux/pinctrl/consumer.h>
31#include <linux/pm.h> 32#include <linux/pm.h>
32 33
33#include <asm/mach/irq.h>
34
35#define GPIO_BANK(x) ((x) >> 5) 34#define GPIO_BANK(x) ((x) >> 5)
36#define GPIO_PORT(x) (((x) >> 3) & 0x3) 35#define GPIO_PORT(x) (((x) >> 3) & 0x3)
37#define GPIO_BIT(x) ((x) & 0x7) 36#define GPIO_BIT(x) ((x) & 0x7)
diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
index 04d86a9803f4..6a5201351507 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -13,6 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/irqdomain.h> 15#include <linux/irqdomain.h>
16#include <linux/irqchip/chained_irq.h>
16#include <linux/of_address.h> 17#include <linux/of_address.h>
17#include <linux/of_irq.h> 18#include <linux/of_irq.h>
18#include <asm/mach/irq.h> 19#include <asm/mach/irq.h>
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index a32e0d5aa45f..0b1c0af646de 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -38,6 +38,7 @@
38#include <linux/interrupt.h> 38#include <linux/interrupt.h>
39#include <linux/percpu.h> 39#include <linux/percpu.h>
40#include <linux/slab.h> 40#include <linux/slab.h>
41#include <linux/irqchip/chained_irq.h>
41#include <linux/irqchip/arm-gic.h> 42#include <linux/irqchip/arm-gic.h>
42 43
43#include <asm/irq.h> 44#include <asm/irq.h>
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 75933a6aa828..5cbadc9ad2e8 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -18,6 +18,7 @@
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <linux/irqdomain.h> 20#include <linux/irqdomain.h>
21#include <linux/irqchip/chained_irq.h>
21#include <linux/io.h> 22#include <linux/io.h>
22#include <linux/gpio.h> 23#include <linux/gpio.h>
23#include <linux/pinctrl/machine.h> 24#include <linux/pinctrl/machine.h>
@@ -27,8 +28,6 @@
27/* Since we request GPIOs from ourself */ 28/* Since we request GPIOs from ourself */
28#include <linux/pinctrl/consumer.h> 29#include <linux/pinctrl/consumer.h>
29 30
30#include <asm/mach/irq.h>
31
32#include <mach/hardware.h> 31#include <mach/hardware.h>
33#include <mach/at91_pio.h> 32#include <mach/at91_pio.h>
34 33
diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c
index 538b9ddaadf7..7265e551dddb 100644
--- a/drivers/pinctrl/pinctrl-exynos.c
+++ b/drivers/pinctrl/pinctrl-exynos.c
@@ -23,13 +23,12 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/irqdomain.h> 24#include <linux/irqdomain.h>
25#include <linux/irq.h> 25#include <linux/irq.h>
26#include <linux/irqchip/chained_irq.h>
26#include <linux/of_irq.h> 27#include <linux/of_irq.h>
27#include <linux/io.h> 28#include <linux/io.h>
28#include <linux/slab.h> 29#include <linux/slab.h>
29#include <linux/err.h> 30#include <linux/err.h>
30 31
31#include <asm/mach/irq.h>
32
33#include "pinctrl-samsung.h" 32#include "pinctrl-samsung.h"
34#include "pinctrl-exynos.h" 33#include "pinctrl-exynos.h"
35 34
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index 36d20293de5c..93eba9715e62 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -23,6 +23,7 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/irqdomain.h> 25#include <linux/irqdomain.h>
26#include <linux/irqchip/chained_irq.h>
26#include <linux/slab.h> 27#include <linux/slab.h>
27#include <linux/of_device.h> 28#include <linux/of_device.h>
28#include <linux/of_address.h> 29#include <linux/of_address.h>
@@ -33,7 +34,6 @@
33/* Since we request GPIOs from ourself */ 34/* Since we request GPIOs from ourself */
34#include <linux/pinctrl/consumer.h> 35#include <linux/pinctrl/consumer.h>
35#include <linux/platform_data/pinctrl-nomadik.h> 36#include <linux/platform_data/pinctrl-nomadik.h>
36#include <asm/mach/irq.h>
37#include "pinctrl-nomadik.h" 37#include "pinctrl-nomadik.h"
38#include "core.h" 38#include "core.h"
39 39
diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c
index d02498b30c6e..ab26b4b669d5 100644
--- a/drivers/pinctrl/pinctrl-sirf.c
+++ b/drivers/pinctrl/pinctrl-sirf.c
@@ -14,6 +14,7 @@
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/irqdomain.h> 16#include <linux/irqdomain.h>
17#include <linux/irqchip/chained_irq.h>
17#include <linux/pinctrl/pinctrl.h> 18#include <linux/pinctrl/pinctrl.h>
18#include <linux/pinctrl/pinmux.h> 19#include <linux/pinctrl/pinmux.h>
19#include <linux/pinctrl/consumer.h> 20#include <linux/pinctrl/consumer.h>
@@ -25,7 +26,6 @@
25#include <linux/bitops.h> 26#include <linux/bitops.h>
26#include <linux/gpio.h> 27#include <linux/gpio.h>
27#include <linux/of_gpio.h> 28#include <linux/of_gpio.h>
28#include <asm/mach/irq.h>
29 29
30#define DRIVER_NAME "pinmux-sirf" 30#define DRIVER_NAME "pinmux-sirf"
31 31
diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
index 295b349a05cf..a4908ecd74fb 100644
--- a/drivers/pinctrl/spear/pinctrl-plgpio.c
+++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
@@ -15,12 +15,12 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/irqdomain.h> 17#include <linux/irqdomain.h>
18#include <linux/irqchip/chained_irq.h>
18#include <linux/module.h> 19#include <linux/module.h>
19#include <linux/pinctrl/consumer.h> 20#include <linux/pinctrl/consumer.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21#include <linux/pm.h> 22#include <linux/pm.h>
22#include <linux/spinlock.h> 23#include <linux/spinlock.h>
23#include <asm/mach/irq.h>
24 24
25#define MAX_GPIO_PER_REG 32 25#define MAX_GPIO_PER_REG 32
26#define PIN_OFFSET(pin) (pin % MAX_GPIO_PER_REG) 26#define PIN_OFFSET(pin) (pin % MAX_GPIO_PER_REG)
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
index 366f259e3756..6efe4e1b499f 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
@@ -25,8 +25,8 @@
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/list.h> 26#include <linux/list.h>
27#include <linux/irq.h> 27#include <linux/irq.h>
28#include <linux/irqchip/chained_irq.h>
28#include <linux/of_device.h> 29#include <linux/of_device.h>
29#include <asm/mach/irq.h>
30 30
31#include "imx-ipu-v3.h" 31#include "imx-ipu-v3.h"
32#include "ipu-prv.h" 32#include "ipu-prv.h"
diff --git a/include/linux/irqchip/chained_irq.h b/include/linux/irqchip/chained_irq.h
new file mode 100644
index 000000000000..adf4c30f3af6
--- /dev/null
+++ b/include/linux/irqchip/chained_irq.h
@@ -0,0 +1,52 @@
1/*
2 * Chained IRQ handlers support.
3 *
4 * Copyright (C) 2011 ARM Ltd.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18#ifndef __IRQCHIP_CHAINED_IRQ_H
19#define __IRQCHIP_CHAINED_IRQ_H
20
21#include <linux/irq.h>
22
23/*
24 * Entry/exit functions for chained handlers where the primary IRQ chip
25 * may implement either fasteoi or level-trigger flow control.
26 */
27static inline void chained_irq_enter(struct irq_chip *chip,
28 struct irq_desc *desc)
29{
30 /* FastEOI controllers require no action on entry. */
31 if (chip->irq_eoi)
32 return;
33
34 if (chip->irq_mask_ack) {
35 chip->irq_mask_ack(&desc->irq_data);
36 } else {
37 chip->irq_mask(&desc->irq_data);
38 if (chip->irq_ack)
39 chip->irq_ack(&desc->irq_data);
40 }
41}
42
43static inline void chained_irq_exit(struct irq_chip *chip,
44 struct irq_desc *desc)
45{
46 if (chip->irq_eoi)
47 chip->irq_eoi(&desc->irq_data);
48 else
49 chip->irq_unmask(&desc->irq_data);
50}
51
52#endif /* __IRQCHIP_CHAINED_IRQ_H */