diff options
author | Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> | 2009-10-22 17:47:42 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-10-22 17:47:42 -0400 |
commit | c33da3a80074094303d643a90ef589330b491270 (patch) | |
tree | 64c8a0d9a56a4590e21641c04deae0b6a66eb8c0 /arch/arm/mach-omap1 | |
parent | dcc730dc9d7614fdaf6bce73d6e8ffe47c8820b1 (diff) |
omap1: Fix redundant UARTs pin muxing that can break other hardware support
Commit 15ac408ee5a509053a765b816e9179515329369f removed enabled_uart
and OMAP_TAG_UART. This works for mach-omap2, but causes issues on
mach-omap1 for some boards as the mach-omap1 serial.c was muxing
pins based on the enabled_uart flag for 15xx.
Fix this by muxing pins in board-*.c files for the 15xx boards for
the uart ports that had enabled_uart flag set before the commit
above.
Tested on Amsdtrad Delta only.
Note that in the future we should add support for powering down
the uarts with a timer like mach-omap2/serial.c does. Otherwise
the enabled uarts will be blocking retention-while-idle.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-generic.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmte.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmtt.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmz71.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-sx1.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-voiceblue.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap1/serial.c | 26 |
9 files changed, 72 insertions, 26 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 42920f9c1a11..972499e95244 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -219,6 +219,10 @@ static struct platform_device *ams_delta_devices[] __initdata = { | |||
219 | 219 | ||
220 | static void __init ams_delta_init(void) | 220 | static void __init ams_delta_init(void) |
221 | { | 221 | { |
222 | /* mux pins for uarts */ | ||
223 | omap_cfg_reg(UART1_TX); | ||
224 | omap_cfg_reg(UART1_RTS); | ||
225 | |||
222 | iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); | 226 | iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); |
223 | 227 | ||
224 | omap_board_config = ams_delta_config; | 228 | omap_board_config = ams_delta_config; |
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index fb47239da72f..6c8a41f20e51 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c | |||
@@ -64,6 +64,14 @@ static void __init omap_generic_init(void) | |||
64 | { | 64 | { |
65 | #ifdef CONFIG_ARCH_OMAP15XX | 65 | #ifdef CONFIG_ARCH_OMAP15XX |
66 | if (cpu_is_omap15xx()) { | 66 | if (cpu_is_omap15xx()) { |
67 | /* mux pins for uarts */ | ||
68 | omap_cfg_reg(UART1_TX); | ||
69 | omap_cfg_reg(UART1_RTS); | ||
70 | omap_cfg_reg(UART2_TX); | ||
71 | omap_cfg_reg(UART2_RTS); | ||
72 | omap_cfg_reg(UART3_TX); | ||
73 | omap_cfg_reg(UART3_RX); | ||
74 | |||
67 | omap_usb_init(&generic1510_usb_config); | 75 | omap_usb_init(&generic1510_usb_config); |
68 | } | 76 | } |
69 | #endif | 77 | #endif |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index cc2abbb2d0f4..cd6c39514826 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -376,6 +376,26 @@ static void __init innovator_init(void) | |||
376 | { | 376 | { |
377 | #ifdef CONFIG_ARCH_OMAP15XX | 377 | #ifdef CONFIG_ARCH_OMAP15XX |
378 | if (cpu_is_omap1510()) { | 378 | if (cpu_is_omap1510()) { |
379 | unsigned char reg; | ||
380 | |||
381 | /* mux pins for uarts */ | ||
382 | omap_cfg_reg(UART1_TX); | ||
383 | omap_cfg_reg(UART1_RTS); | ||
384 | omap_cfg_reg(UART2_TX); | ||
385 | omap_cfg_reg(UART2_RTS); | ||
386 | omap_cfg_reg(UART3_TX); | ||
387 | omap_cfg_reg(UART3_RX); | ||
388 | |||
389 | reg = fpga_read(OMAP1510_FPGA_POWER); | ||
390 | reg |= OMAP1510_FPGA_PCR_COM1_EN; | ||
391 | fpga_write(reg, OMAP1510_FPGA_POWER); | ||
392 | udelay(10); | ||
393 | |||
394 | reg = fpga_read(OMAP1510_FPGA_POWER); | ||
395 | reg |= OMAP1510_FPGA_PCR_COM2_EN; | ||
396 | fpga_write(reg, OMAP1510_FPGA_POWER); | ||
397 | udelay(10); | ||
398 | |||
379 | platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices)); | 399 | platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices)); |
380 | spi_register_board_info(innovator1510_boardinfo, | 400 | spi_register_board_info(innovator1510_boardinfo, |
381 | ARRAY_SIZE(innovator1510_boardinfo)); | 401 | ARRAY_SIZE(innovator1510_boardinfo)); |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 90dd0431b0dc..4de258420f39 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -342,6 +342,14 @@ static void __init palmte_misc_gpio_setup(void) | |||
342 | 342 | ||
343 | static void __init omap_palmte_init(void) | 343 | static void __init omap_palmte_init(void) |
344 | { | 344 | { |
345 | /* mux pins for uarts */ | ||
346 | omap_cfg_reg(UART1_TX); | ||
347 | omap_cfg_reg(UART1_RTS); | ||
348 | omap_cfg_reg(UART2_TX); | ||
349 | omap_cfg_reg(UART2_RTS); | ||
350 | omap_cfg_reg(UART3_TX); | ||
351 | omap_cfg_reg(UART3_RX); | ||
352 | |||
345 | omap_board_config = palmte_config; | 353 | omap_board_config = palmte_config; |
346 | omap_board_config_size = ARRAY_SIZE(palmte_config); | 354 | omap_board_config_size = ARRAY_SIZE(palmte_config); |
347 | 355 | ||
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index 8256139891ff..d972cf941b76 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -289,6 +289,14 @@ static void __init omap_mpu_wdt_mode(int mode) { | |||
289 | 289 | ||
290 | static void __init omap_palmtt_init(void) | 290 | static void __init omap_palmtt_init(void) |
291 | { | 291 | { |
292 | /* mux pins for uarts */ | ||
293 | omap_cfg_reg(UART1_TX); | ||
294 | omap_cfg_reg(UART1_RTS); | ||
295 | omap_cfg_reg(UART2_TX); | ||
296 | omap_cfg_reg(UART2_RTS); | ||
297 | omap_cfg_reg(UART3_TX); | ||
298 | omap_cfg_reg(UART3_RX); | ||
299 | |||
292 | omap_mpu_wdt_mode(0); | 300 | omap_mpu_wdt_mode(0); |
293 | 301 | ||
294 | omap_board_config = palmtt_config; | 302 | omap_board_config = palmtt_config; |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index 81b6bde1c5a3..986bd4df0e97 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -307,6 +307,14 @@ palmz71_gpio_setup(int early) | |||
307 | static void __init | 307 | static void __init |
308 | omap_palmz71_init(void) | 308 | omap_palmz71_init(void) |
309 | { | 309 | { |
310 | /* mux pins for uarts */ | ||
311 | omap_cfg_reg(UART1_TX); | ||
312 | omap_cfg_reg(UART1_RTS); | ||
313 | omap_cfg_reg(UART2_TX); | ||
314 | omap_cfg_reg(UART2_RTS); | ||
315 | omap_cfg_reg(UART3_TX); | ||
316 | omap_cfg_reg(UART3_RX); | ||
317 | |||
310 | palmz71_gpio_setup(1); | 318 | palmz71_gpio_setup(1); |
311 | omap_mpu_wdt_mode(0); | 319 | omap_mpu_wdt_mode(0); |
312 | 320 | ||
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 02c85ca2e1df..056ae64e0f55 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -377,6 +377,14 @@ static struct omap_board_config_kernel sx1_config[] __initdata = { | |||
377 | 377 | ||
378 | static void __init omap_sx1_init(void) | 378 | static void __init omap_sx1_init(void) |
379 | { | 379 | { |
380 | /* mux pins for uarts */ | ||
381 | omap_cfg_reg(UART1_TX); | ||
382 | omap_cfg_reg(UART1_RTS); | ||
383 | omap_cfg_reg(UART2_TX); | ||
384 | omap_cfg_reg(UART2_RTS); | ||
385 | omap_cfg_reg(UART3_TX); | ||
386 | omap_cfg_reg(UART3_RX); | ||
387 | |||
380 | platform_add_devices(sx1_devices, ARRAY_SIZE(sx1_devices)); | 388 | platform_add_devices(sx1_devices, ARRAY_SIZE(sx1_devices)); |
381 | 389 | ||
382 | omap_board_config = sx1_config; | 390 | omap_board_config = sx1_config; |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index c06e7a553472..07b07522d5bf 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -152,6 +152,14 @@ static void __init voiceblue_init_irq(void) | |||
152 | 152 | ||
153 | static void __init voiceblue_init(void) | 153 | static void __init voiceblue_init(void) |
154 | { | 154 | { |
155 | /* mux pins for uarts */ | ||
156 | omap_cfg_reg(UART1_TX); | ||
157 | omap_cfg_reg(UART1_RTS); | ||
158 | omap_cfg_reg(UART2_TX); | ||
159 | omap_cfg_reg(UART2_RTS); | ||
160 | omap_cfg_reg(UART3_TX); | ||
161 | omap_cfg_reg(UART3_RX); | ||
162 | |||
155 | /* Watchdog */ | 163 | /* Watchdog */ |
156 | gpio_request(0, "Watchdog"); | 164 | gpio_request(0, "Watchdog"); |
157 | /* smc91x reset */ | 165 | /* smc91x reset */ |
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index d496e50fec40..d23979bc0fd5 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c | |||
@@ -131,8 +131,6 @@ void __init omap_serial_init(void) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { | 133 | for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { |
134 | unsigned char reg; | ||
135 | |||
136 | switch (i) { | 134 | switch (i) { |
137 | case 0: | 135 | case 0: |
138 | uart1_ck = clk_get(NULL, "uart1_ck"); | 136 | uart1_ck = clk_get(NULL, "uart1_ck"); |
@@ -143,16 +141,6 @@ void __init omap_serial_init(void) | |||
143 | if (cpu_is_omap15xx()) | 141 | if (cpu_is_omap15xx()) |
144 | clk_set_rate(uart1_ck, 12000000); | 142 | clk_set_rate(uart1_ck, 12000000); |
145 | } | 143 | } |
146 | if (cpu_is_omap15xx()) { | ||
147 | omap_cfg_reg(UART1_TX); | ||
148 | omap_cfg_reg(UART1_RTS); | ||
149 | if (machine_is_omap_innovator()) { | ||
150 | reg = fpga_read(OMAP1510_FPGA_POWER); | ||
151 | reg |= OMAP1510_FPGA_PCR_COM1_EN; | ||
152 | fpga_write(reg, OMAP1510_FPGA_POWER); | ||
153 | udelay(10); | ||
154 | } | ||
155 | } | ||
156 | break; | 144 | break; |
157 | case 1: | 145 | case 1: |
158 | uart2_ck = clk_get(NULL, "uart2_ck"); | 146 | uart2_ck = clk_get(NULL, "uart2_ck"); |
@@ -165,16 +153,6 @@ void __init omap_serial_init(void) | |||
165 | else | 153 | else |
166 | clk_set_rate(uart2_ck, 48000000); | 154 | clk_set_rate(uart2_ck, 48000000); |
167 | } | 155 | } |
168 | if (cpu_is_omap15xx()) { | ||
169 | omap_cfg_reg(UART2_TX); | ||
170 | omap_cfg_reg(UART2_RTS); | ||
171 | if (machine_is_omap_innovator()) { | ||
172 | reg = fpga_read(OMAP1510_FPGA_POWER); | ||
173 | reg |= OMAP1510_FPGA_PCR_COM2_EN; | ||
174 | fpga_write(reg, OMAP1510_FPGA_POWER); | ||
175 | udelay(10); | ||
176 | } | ||
177 | } | ||
178 | break; | 156 | break; |
179 | case 2: | 157 | case 2: |
180 | uart3_ck = clk_get(NULL, "uart3_ck"); | 158 | uart3_ck = clk_get(NULL, "uart3_ck"); |
@@ -185,10 +163,6 @@ void __init omap_serial_init(void) | |||
185 | if (cpu_is_omap15xx()) | 163 | if (cpu_is_omap15xx()) |
186 | clk_set_rate(uart3_ck, 12000000); | 164 | clk_set_rate(uart3_ck, 12000000); |
187 | } | 165 | } |
188 | if (cpu_is_omap15xx()) { | ||
189 | omap_cfg_reg(UART3_TX); | ||
190 | omap_cfg_reg(UART3_RX); | ||
191 | } | ||
192 | break; | 166 | break; |
193 | } | 167 | } |
194 | omap_serial_reset(&serial_platform_data[i]); | 168 | omap_serial_reset(&serial_platform_data[i]); |