aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mm-imx21.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/mm-imx21.c')
-rw-r--r--arch/arm/mach-imx/mm-imx21.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c
index e728af81d1b1..7a0c500ac2c8 100644
--- a/arch/arm/mach-imx/mm-imx21.c
+++ b/arch/arm/mach-imx/mm-imx21.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/* MX21 memory map definition */ 31/* MX21 memory map definition */
29static struct map_desc imx21_io_desc[] __initdata = { 32static struct map_desc imx21_io_desc[] __initdata = {
@@ -56,16 +59,28 @@ static struct map_desc imx21_io_desc[] __initdata = {
56 */ 59 */
57void __init mx21_map_io(void) 60void __init mx21_map_io(void)
58{ 61{
62 iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc));
63}
64
65void __init imx21_init_early(void)
66{
59 mxc_set_cpu_type(MXC_CPU_MX21); 67 mxc_set_cpu_type(MXC_CPU_MX21);
60 mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR)); 68 mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR));
61 69 imx_iomuxv1_init(MX21_IO_ADDRESS(MX21_GPIO_BASE_ADDR),
62 iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc)); 70 MX21_NUM_GPIO_PORT);
63} 71}
64 72
65int imx21_register_gpios(void); 73static struct mxc_gpio_port imx21_gpio_ports[] = {
74 DEFINE_IMX_GPIO_PORT_IRQ(MX21, 0, 1, MX21_INT_GPIO),
75 DEFINE_IMX_GPIO_PORT(MX21, 1, 2),
76 DEFINE_IMX_GPIO_PORT(MX21, 2, 3),
77 DEFINE_IMX_GPIO_PORT(MX21, 3, 4),
78 DEFINE_IMX_GPIO_PORT(MX21, 4, 5),
79 DEFINE_IMX_GPIO_PORT(MX21, 5, 6),
80};
66 81
67void __init mx21_init_irq(void) 82void __init mx21_init_irq(void)
68{ 83{
69 mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); 84 mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR));
70 imx21_register_gpios(); 85 mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports));
71} 86}