summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/imx27-dt.c
diff options
context:
space:
mode:
authorShawn Guo2012-06-13 03:04:03 +0200
committerShawn Guo2012-07-01 15:57:22 +0200
commit1ab7ef158dfbaf6314b6660a3e3fb037cba2a1ca (patch)
tree185ffbcf9922139023bcc282ac37b2626a79facb /arch/arm/mach-imx/imx27-dt.c
parentARM: imx: eliminate macro IRQ_GPIOx() (diff)
downloadkernel-qcow2-linux-1ab7ef158dfbaf6314b6660a3e3fb037cba2a1ca.tar.gz
kernel-qcow2-linux-1ab7ef158dfbaf6314b6660a3e3fb037cba2a1ca.tar.xz
kernel-qcow2-linux-1ab7ef158dfbaf6314b6660a3e3fb037cba2a1ca.zip
gpio/mxc: move irq_domain_add_legacy call into gpio driver
Move irq_domain_add_legacy call from imx*-dt.c into gpio driver and have the gpio driver adopt irqdomain support for both DT and non-DT boot. With all imx platform code converted from static gpio irq number computation to use run-time gpio_to_irq call, we can now use irq_alloc_descs and irqdomain support to dynamically get irq_base and have the mapping between gpio and irq number available without using virtual_irq_start and MXC_GPIO_IRQ_START. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/imx27-dt.c')
-rw-r--r--arch/arm/mach-imx/imx27-dt.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index eee0cc8d92a4..c734e564f204 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -40,21 +40,8 @@ static int __init imx27_avic_add_irq_domain(struct device_node *np,
return 0;
}
-static int __init imx27_gpio_add_irq_domain(struct device_node *np,
- struct device_node *interrupt_parent)
-{
- static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS;
-
- gpio_irq_base -= 32;
- irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops,
- NULL);
-
- return 0;
-}
-
static const struct of_device_id imx27_irq_match[] __initconst = {
{ .compatible = "fsl,imx27-avic", .data = imx27_avic_add_irq_domain, },
- { .compatible = "fsl,imx27-gpio", .data = imx27_gpio_add_irq_domain, },
{ /* sentinel */ }
};