aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/mach-mxs.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-05-04 02:32:35 -0400
committerShawn Guo <shawn.guo@linaro.org>2012-05-12 01:32:19 -0400
commitce4c6f9b5987ac9402788c518bc5bd8b8572aa1e (patch)
treeb065be1ed1491eccc226ae9b0e000cfb203331ee /arch/arm/mach-mxs/mach-mxs.c
parent4052d45e800ce33e1993fb70604941547ed73d26 (diff)
ARM: mxs: add gpio support for device tree boot
It adds gpio support for device tree boot. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-mxs/mach-mxs.c')
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 182ea7529d28..8cac94b33020 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -30,8 +30,20 @@ static int __init mxs_icoll_add_irq_domain(struct device_node *np,
30 return 0; 30 return 0;
31} 31}
32 32
33static int __init mxs_gpio_add_irq_domain(struct device_node *np,
34 struct device_node *interrupt_parent)
35{
36 static int gpio_irq_base = MXS_GPIO_IRQ_START;
37
38 irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, NULL);
39 gpio_irq_base += 32;
40
41 return 0;
42}
43
33static const struct of_device_id mxs_irq_match[] __initconst = { 44static const struct of_device_id mxs_irq_match[] __initconst = {
34 { .compatible = "fsl,mxs-icoll", .data = mxs_icoll_add_irq_domain, }, 45 { .compatible = "fsl,mxs-icoll", .data = mxs_icoll_add_irq_domain, },
46 { .compatible = "fsl,mxs-gpio", .data = mxs_gpio_add_irq_domain, },
35 { /* sentinel */ } 47 { /* sentinel */ }
36}; 48};
37 49