diff options
Diffstat (limited to 'arch/arm/mach-mx5/mm-mx50.c')
-rw-r--r-- | arch/arm/mach-mx5/mm-mx50.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/mach-mx5/mm-mx50.c b/arch/arm/mach-mx5/mm-mx50.c index 8c6540e58390..b9c363b514a9 100644 --- a/arch/arm/mach-mx5/mm-mx50.c +++ b/arch/arm/mach-mx5/mm-mx50.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <mach/common.h> | 27 | #include <mach/common.h> |
28 | #include <mach/iomux-v3.h> | 28 | #include <mach/iomux-v3.h> |
29 | #include <mach/gpio.h> | ||
30 | #include <mach/irqs.h> | ||
29 | 31 | ||
30 | /* | 32 | /* |
31 | * Define the MX50 memory map. | 33 | * Define the MX50 memory map. |
@@ -44,16 +46,27 @@ static struct map_desc mx50_io_desc[] __initdata = { | |||
44 | */ | 46 | */ |
45 | void __init mx50_map_io(void) | 47 | void __init mx50_map_io(void) |
46 | { | 48 | { |
49 | iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc)); | ||
50 | } | ||
51 | |||
52 | void __init imx50_init_early(void) | ||
53 | { | ||
47 | mxc_set_cpu_type(MXC_CPU_MX50); | 54 | mxc_set_cpu_type(MXC_CPU_MX50); |
48 | mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR)); | 55 | mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR)); |
49 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); | 56 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); |
50 | iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc)); | ||
51 | } | 57 | } |
52 | 58 | ||
53 | int imx50_register_gpios(void); | 59 | static struct mxc_gpio_port imx50_gpio_ports[] = { |
60 | DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 0, 1, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH), | ||
61 | DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 1, 2, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH), | ||
62 | DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 2, 3, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH), | ||
63 | DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 3, 4, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH), | ||
64 | DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 4, 5, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH), | ||
65 | DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 5, 6, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH), | ||
66 | }; | ||
54 | 67 | ||
55 | void __init mx50_init_irq(void) | 68 | void __init mx50_init_irq(void) |
56 | { | 69 | { |
57 | tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR)); | 70 | tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR)); |
58 | imx50_register_gpios(); | 71 | mxc_gpio_init(imx50_gpio_ports, ARRAY_SIZE(imx50_gpio_ports)); |
59 | } | 72 | } |