diff options
Diffstat (limited to 'arch/arm/mach-mx5/board-mx51_3ds.c')
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_3ds.c | 43 |
1 files changed, 12 insertions, 31 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c index 49d64484237..63dfbeafbc1 100644 --- a/arch/arm/mach-mx5/board-mx51_3ds.c +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
@@ -71,24 +71,10 @@ static iomux_v3_cfg_t mx51_3ds_pads[] = { | |||
71 | }; | 71 | }; |
72 | 72 | ||
73 | /* Serial ports */ | 73 | /* Serial ports */ |
74 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | ||
75 | static const struct imxuart_platform_data uart_pdata __initconst = { | 74 | static const struct imxuart_platform_data uart_pdata __initconst = { |
76 | .flags = IMXUART_HAVE_RTSCTS, | 75 | .flags = IMXUART_HAVE_RTSCTS, |
77 | }; | 76 | }; |
78 | 77 | ||
79 | static inline void mxc_init_imx_uart(void) | ||
80 | { | ||
81 | imx51_add_imx_uart(0, &uart_pdata); | ||
82 | imx51_add_imx_uart(1, &uart_pdata); | ||
83 | imx51_add_imx_uart(2, &uart_pdata); | ||
84 | } | ||
85 | #else /* !SERIAL_IMX */ | ||
86 | static inline void mxc_init_imx_uart(void) | ||
87 | { | ||
88 | } | ||
89 | #endif /* SERIAL_IMX */ | ||
90 | |||
91 | #if defined(CONFIG_KEYBOARD_IMX) || defined(CONFIG_KEYBOARD_IMX_MODULE) | ||
92 | static int mx51_3ds_board_keymap[] = { | 78 | static int mx51_3ds_board_keymap[] = { |
93 | KEY(0, 0, KEY_1), | 79 | KEY(0, 0, KEY_1), |
94 | KEY(0, 1, KEY_2), | 80 | KEY(0, 1, KEY_2), |
@@ -124,16 +110,6 @@ static const struct matrix_keymap_data mx51_3ds_map_data __initconst = { | |||
124 | .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap), | 110 | .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap), |
125 | }; | 111 | }; |
126 | 112 | ||
127 | static void mxc_init_keypad(void) | ||
128 | { | ||
129 | imx51_add_imx_keypad(&mx51_3ds_map_data); | ||
130 | } | ||
131 | #else | ||
132 | static inline void mxc_init_keypad(void) | ||
133 | { | ||
134 | } | ||
135 | #endif | ||
136 | |||
137 | static int mx51_3ds_spi2_cs[] = { | 113 | static int mx51_3ds_spi2_cs[] = { |
138 | MXC_SPI_CS(0), | 114 | MXC_SPI_CS(0), |
139 | MX51_3DS_ECSPI2_CS, | 115 | MX51_3DS_ECSPI2_CS, |
@@ -157,11 +133,14 @@ static struct spi_board_info mx51_3ds_spi_nor_device[] = { | |||
157 | /* | 133 | /* |
158 | * Board specific initialization. | 134 | * Board specific initialization. |
159 | */ | 135 | */ |
160 | static void __init mxc_board_init(void) | 136 | static void __init mx51_3ds_init(void) |
161 | { | 137 | { |
162 | mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads, | 138 | mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads, |
163 | ARRAY_SIZE(mx51_3ds_pads)); | 139 | ARRAY_SIZE(mx51_3ds_pads)); |
164 | mxc_init_imx_uart(); | 140 | |
141 | imx51_add_imx_uart(0, &uart_pdata); | ||
142 | imx51_add_imx_uart(1, &uart_pdata); | ||
143 | imx51_add_imx_uart(2, &uart_pdata); | ||
165 | 144 | ||
166 | imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata); | 145 | imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata); |
167 | spi_register_board_info(mx51_3ds_spi_nor_device, | 146 | spi_register_board_info(mx51_3ds_spi_nor_device, |
@@ -172,7 +151,8 @@ static void __init mxc_board_init(void) | |||
172 | "devices on the board are unusable.\n"); | 151 | "devices on the board are unusable.\n"); |
173 | 152 | ||
174 | imx51_add_sdhci_esdhc_imx(0, NULL); | 153 | imx51_add_sdhci_esdhc_imx(0, NULL); |
175 | mxc_init_keypad(); | 154 | imx51_add_imx_keypad(&mx51_3ds_map_data); |
155 | imx51_add_imx2_wdt(0, NULL); | ||
176 | } | 156 | } |
177 | 157 | ||
178 | static void __init mx51_3ds_timer_init(void) | 158 | static void __init mx51_3ds_timer_init(void) |
@@ -180,15 +160,16 @@ static void __init mx51_3ds_timer_init(void) | |||
180 | mx51_clocks_init(32768, 24000000, 22579200, 0); | 160 | mx51_clocks_init(32768, 24000000, 22579200, 0); |
181 | } | 161 | } |
182 | 162 | ||
183 | static struct sys_timer mxc_timer = { | 163 | static struct sys_timer mx51_3ds_timer = { |
184 | .init = mx51_3ds_timer_init, | 164 | .init = mx51_3ds_timer_init, |
185 | }; | 165 | }; |
186 | 166 | ||
187 | MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") | 167 | MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") |
188 | /* Maintainer: Freescale Semiconductor, Inc. */ | 168 | /* Maintainer: Freescale Semiconductor, Inc. */ |
189 | .boot_params = MX51_PHYS_OFFSET + 0x100, | 169 | .boot_params = MX51_PHYS_OFFSET + 0x100, |
190 | .map_io = mx51_map_io, | 170 | .map_io = mx51_map_io, |
171 | .init_early = imx51_init_early, | ||
191 | .init_irq = mx51_init_irq, | 172 | .init_irq = mx51_init_irq, |
192 | .init_machine = mxc_board_init, | 173 | .timer = &mx51_3ds_timer, |
193 | .timer = &mxc_timer, | 174 | .init_machine = mx51_3ds_init, |
194 | MACHINE_END | 175 | MACHINE_END |