diff options
Diffstat (limited to 'arch/arm/mach-imx/mm-imx27.c')
-rw-r--r-- | arch/arm/mach-imx/mm-imx27.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c index 374e48b7a41..a6761a39f08 100644 --- a/arch/arm/mach-imx/mm-imx27.c +++ b/arch/arm/mach-imx/mm-imx27.c | |||
@@ -24,6 +24,9 @@ | |||
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> | ||
29 | #include <mach/iomux-v1.h> | ||
27 | 30 | ||
28 | /* MX27 memory map definition */ | 31 | /* MX27 memory map definition */ |
29 | static struct map_desc imx27_io_desc[] __initdata = { | 32 | static struct map_desc imx27_io_desc[] __initdata = { |
@@ -56,16 +59,28 @@ static struct map_desc imx27_io_desc[] __initdata = { | |||
56 | */ | 59 | */ |
57 | void __init mx27_map_io(void) | 60 | void __init mx27_map_io(void) |
58 | { | 61 | { |
62 | iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc)); | ||
63 | } | ||
64 | |||
65 | void __init imx27_init_early(void) | ||
66 | { | ||
59 | mxc_set_cpu_type(MXC_CPU_MX27); | 67 | mxc_set_cpu_type(MXC_CPU_MX27); |
60 | mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR)); | 68 | mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR)); |
61 | 69 | imx_iomuxv1_init(MX27_IO_ADDRESS(MX27_GPIO_BASE_ADDR), | |
62 | iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc)); | 70 | MX27_NUM_GPIO_PORT); |
63 | } | 71 | } |
64 | 72 | ||
65 | int imx27_register_gpios(void); | 73 | static struct mxc_gpio_port imx27_gpio_ports[] = { |
74 | DEFINE_IMX_GPIO_PORT_IRQ(MX27, 0, 1, MX27_INT_GPIO), | ||
75 | DEFINE_IMX_GPIO_PORT(MX27, 1, 2), | ||
76 | DEFINE_IMX_GPIO_PORT(MX27, 2, 3), | ||
77 | DEFINE_IMX_GPIO_PORT(MX27, 3, 4), | ||
78 | DEFINE_IMX_GPIO_PORT(MX27, 4, 5), | ||
79 | DEFINE_IMX_GPIO_PORT(MX27, 5, 6), | ||
80 | }; | ||
66 | 81 | ||
67 | void __init mx27_init_irq(void) | 82 | void __init mx27_init_irq(void) |
68 | { | 83 | { |
69 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); | 84 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); |
70 | imx27_register_gpios(); | 85 | mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports)); |
71 | } | 86 | } |