diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-05-04 08:32:35 +0200 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-12 07:32:19 +0200 |
commit | ce4c6f9b5987ac9402788c518bc5bd8b8572aa1e (patch) | |
tree | b065be1ed1491eccc226ae9b0e000cfb203331ee /arch/arm/mach-mxs | |
parent | gpio/mxs: add device tree probe (diff) | |
download | linux-ce4c6f9b5987ac9402788c518bc5bd8b8572aa1e.tar.xz linux-ce4c6f9b5987ac9402788c518bc5bd8b8572aa1e.zip |
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')
-rw-r--r-- | arch/arm/mach-mxs/mach-mxs.c | 12 |
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, return 0; } +static int __init mxs_gpio_add_irq_domain(struct device_node *np, + struct device_node *interrupt_parent) +{ + static int gpio_irq_base = MXS_GPIO_IRQ_START; + + irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, NULL); + gpio_irq_base += 32; + + return 0; +} + static const struct of_device_id mxs_irq_match[] __initconst = { { .compatible = "fsl,mxs-icoll", .data = mxs_icoll_add_irq_domain, }, + { .compatible = "fsl,mxs-gpio", .data = mxs_gpio_add_irq_domain, }, { /* sentinel */ } }; |