summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/mm-imx25.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-02-17 16:43:48 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-07 21:29:37 +0300
commit5ae30b477e9fb7319e2976fbf3521c0fac2625f1 (patch)
treee9c943a384e61b4552175e35a981bdf2316baba2 /arch/arm/mach-imx/mm-imx25.c
parent9685a3609d7f15297987c511c323b43693317960 (diff)
downloadlinux-5ae30b477e9fb7319e2976fbf3521c0fac2625f1.tar.xz
ARM i.MX: Move gpio initialization to SoC specific files
This saves us from soc level dispatching in generic files Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/mm-imx25.c')
-rw-r--r--arch/arm/mach-imx/mm-imx25.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/mm-imx25.c b/arch/arm/mach-imx/mm-imx25.c
index 09dd8d4e15bb..02f7b5c7fa8e 100644
--- a/arch/arm/mach-imx/mm-imx25.c
+++ b/arch/arm/mach-imx/mm-imx25.c
@@ -27,6 +27,8 @@
#include <mach/hardware.h>
#include <mach/mx25.h>
#include <mach/iomux-v3.h>
+#include <mach/gpio.h>
+#include <mach/irqs.h>
/*
* This table defines static virtual address mappings for I/O regions.
@@ -55,11 +57,16 @@ void __init imx25_init_early(void)
mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR));
}
-int imx25_register_gpios(void);
+static struct mxc_gpio_port imx25_gpio_ports[] = {
+ DEFINE_IMX_GPIO_PORT_IRQ(MX25, 0, 1, MX25_INT_GPIO1),
+ DEFINE_IMX_GPIO_PORT_IRQ(MX25, 1, 2, MX25_INT_GPIO2),
+ DEFINE_IMX_GPIO_PORT_IRQ(MX25, 2, 3, MX25_INT_GPIO3),
+ DEFINE_IMX_GPIO_PORT_IRQ(MX25, 3, 4, MX25_INT_GPIO4),
+};
void __init mx25_init_irq(void)
{
mxc_init_irq(MX25_IO_ADDRESS(MX25_AVIC_BASE_ADDR));
- imx25_register_gpios();
+ mxc_gpio_init(imx25_gpio_ports, ARRAY_SIZE(imx25_gpio_ports));
}