From ce4c6f9b5987ac9402788c518bc5bd8b8572aa1e Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Fri, 4 May 2012 14:32:35 +0800 Subject: ARM: mxs: add gpio support for device tree boot It adds gpio support for device tree boot. Signed-off-by: Shawn Guo Acked-by: Linus Walleij --- arch/arm/mach-mxs/mach-mxs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/mach-mxs') 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 */ } }; -- cgit v1.2.2