aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mm-imx1.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-02-17 08:43:48 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-07 13:29:37 -0500
commit5ae30b477e9fb7319e2976fbf3521c0fac2625f1 (patch)
treee9c943a384e61b4552175e35a981bdf2316baba2 /arch/arm/mach-imx/mm-imx1.c
parent9685a3609d7f15297987c511c323b43693317960 (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-imx1.c')
-rw-r--r--arch/arm/mach-imx/mm-imx1.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/mm-imx1.c b/arch/arm/mach-imx/mm-imx1.c
index 378c61b1e74c..8613e440e48c 100644
--- a/arch/arm/mach-imx/mm-imx1.c
+++ b/arch/arm/mach-imx/mm-imx1.c
@@ -23,6 +23,8 @@
23 23
24#include <mach/common.h> 24#include <mach/common.h>
25#include <mach/hardware.h> 25#include <mach/hardware.h>
26#include <mach/gpio.h>
27#include <mach/irqs.h>
26 28
27static struct map_desc imx_io_desc[] __initdata = { 29static struct map_desc imx_io_desc[] __initdata = {
28 imx_map_entry(MX1, IO, MT_DEVICE), 30 imx_map_entry(MX1, IO, MT_DEVICE),
@@ -39,10 +41,15 @@ void __init imx1_init_early(void)
39 mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR)); 41 mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR));
40} 42}
41 43
42int imx1_register_gpios(void); 44static struct mxc_gpio_port imx1_gpio_ports[] = {
45 DEFINE_IMX_GPIO_PORT_IRQ(MX1, 0, 1, MX1_GPIO_INT_PORTA),
46 DEFINE_IMX_GPIO_PORT_IRQ(MX1, 1, 2, MX1_GPIO_INT_PORTB),
47 DEFINE_IMX_GPIO_PORT_IRQ(MX1, 2, 3, MX1_GPIO_INT_PORTC),
48 DEFINE_IMX_GPIO_PORT_IRQ(MX1, 3, 4, MX1_GPIO_INT_PORTD),
49};
43 50
44void __init mx1_init_irq(void) 51void __init mx1_init_irq(void)
45{ 52{
46 mxc_init_irq(MX1_IO_ADDRESS(MX1_AVIC_BASE_ADDR)); 53 mxc_init_irq(MX1_IO_ADDRESS(MX1_AVIC_BASE_ADDR));
47 imx1_register_gpios(); 54 mxc_gpio_init(imx1_gpio_ports, ARRAY_SIZE(imx1_gpio_ports));
48} 55}