diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-02-17 08:43:48 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-03-07 13:29:37 -0500 |
commit | 5ae30b477e9fb7319e2976fbf3521c0fac2625f1 (patch) | |
tree | e9c943a384e61b4552175e35a981bdf2316baba2 /arch/arm/mach-imx/mm-imx27.c | |
parent | 9685a3609d7f15297987c511c323b43693317960 (diff) |
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-imx27.c')
-rw-r--r-- | arch/arm/mach-imx/mm-imx27.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c index bcaa3b69c456..e172e3ed3340 100644 --- a/arch/arm/mach-imx/mm-imx27.c +++ b/arch/arm/mach-imx/mm-imx27.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <mach/common.h> | 24 | #include <mach/common.h> |
25 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | #include <mach/gpio.h> | ||
28 | #include <mach/irqs.h> | ||
27 | 29 | ||
28 | /* MX27 memory map definition */ | 30 | /* MX27 memory map definition */ |
29 | static struct map_desc imx27_io_desc[] __initdata = { | 31 | static struct map_desc imx27_io_desc[] __initdata = { |
@@ -65,10 +67,17 @@ void __init imx27_init_early(void) | |||
65 | mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR)); | 67 | mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR)); |
66 | } | 68 | } |
67 | 69 | ||
68 | int imx27_register_gpios(void); | 70 | static struct mxc_gpio_port imx27_gpio_ports[] = { |
71 | DEFINE_IMX_GPIO_PORT_IRQ(MX27, 0, 1, MX27_INT_GPIO), | ||
72 | DEFINE_IMX_GPIO_PORT(MX27, 1, 2), | ||
73 | DEFINE_IMX_GPIO_PORT(MX27, 2, 3), | ||
74 | DEFINE_IMX_GPIO_PORT(MX27, 3, 4), | ||
75 | DEFINE_IMX_GPIO_PORT(MX27, 4, 5), | ||
76 | DEFINE_IMX_GPIO_PORT(MX27, 5, 6), | ||
77 | }; | ||
69 | 78 | ||
70 | void __init mx27_init_irq(void) | 79 | void __init mx27_init_irq(void) |
71 | { | 80 | { |
72 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); | 81 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); |
73 | imx27_register_gpios(); | 82 | mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports)); |
74 | } | 83 | } |