diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart.h | 2 | ||||
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart_core.c | 16 | ||||
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart_cpm1.c | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart.h b/drivers/serial/cpm_uart/cpm_uart.h index a8f894c781..69715e5565 100644 --- a/drivers/serial/cpm_uart/cpm_uart.h +++ b/drivers/serial/cpm_uart/cpm_uart.h | |||
@@ -88,7 +88,7 @@ extern struct uart_cpm_port cpm_uart_ports[UART_NR]; | |||
88 | 88 | ||
89 | /* these are located in their respective files */ | 89 | /* these are located in their respective files */ |
90 | void cpm_line_cr_cmd(int line, int cmd); | 90 | void cpm_line_cr_cmd(int line, int cmd); |
91 | int cpm_uart_init_portdesc(void); | 91 | int __init cpm_uart_init_portdesc(void); |
92 | int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con); | 92 | int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con); |
93 | void cpm_uart_freebuf(struct uart_cpm_port *pinfo); | 93 | void cpm_uart_freebuf(struct uart_cpm_port *pinfo); |
94 | 94 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 0abb544ae6..7a3b97fdf8 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -195,10 +195,8 @@ static void cpm_uart_start_tx(struct uart_port *port) | |||
195 | if (cpm_uart_tx_pump(port) != 0) { | 195 | if (cpm_uart_tx_pump(port) != 0) { |
196 | if (IS_SMC(pinfo)) { | 196 | if (IS_SMC(pinfo)) { |
197 | smcp->smc_smcm |= SMCM_TX; | 197 | smcp->smc_smcm |= SMCM_TX; |
198 | smcp->smc_smcmr |= SMCMR_TEN; | ||
199 | } else { | 198 | } else { |
200 | sccp->scc_sccm |= UART_SCCM_TX; | 199 | sccp->scc_sccm |= UART_SCCM_TX; |
201 | pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT; | ||
202 | } | 200 | } |
203 | } | 201 | } |
204 | } | 202 | } |
@@ -421,9 +419,10 @@ static int cpm_uart_startup(struct uart_port *port) | |||
421 | /* Startup rx-int */ | 419 | /* Startup rx-int */ |
422 | if (IS_SMC(pinfo)) { | 420 | if (IS_SMC(pinfo)) { |
423 | pinfo->smcp->smc_smcm |= SMCM_RX; | 421 | pinfo->smcp->smc_smcm |= SMCM_RX; |
424 | pinfo->smcp->smc_smcmr |= SMCMR_REN; | 422 | pinfo->smcp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN); |
425 | } else { | 423 | } else { |
426 | pinfo->sccp->scc_sccm |= UART_SCCM_RX; | 424 | pinfo->sccp->scc_sccm |= UART_SCCM_RX; |
425 | pinfo->sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT); | ||
427 | } | 426 | } |
428 | 427 | ||
429 | if (!(pinfo->flags & FLAG_CONSOLE)) | 428 | if (!(pinfo->flags & FLAG_CONSOLE)) |
@@ -1350,11 +1349,10 @@ static int cpm_uart_init(void) { | |||
1350 | pr_info("cpm_uart: WARNING: no UART devices found on platform bus!\n"); | 1349 | pr_info("cpm_uart: WARNING: no UART devices found on platform bus!\n"); |
1351 | pr_info( | 1350 | pr_info( |
1352 | "cpm_uart: the driver will guess configuration, but this mode is no longer supported.\n"); | 1351 | "cpm_uart: the driver will guess configuration, but this mode is no longer supported.\n"); |
1353 | #ifndef CONFIG_SERIAL_CPM_CONSOLE | 1352 | |
1354 | ret = cpm_uart_init_portdesc(); | 1353 | /* Don't run this again, if the console driver did it already */ |
1355 | if (ret) | 1354 | if (cpm_uart_nr == 0) |
1356 | return ret; | 1355 | cpm_uart_init_portdesc(); |
1357 | #endif | ||
1358 | 1356 | ||
1359 | cpm_reg.nr = cpm_uart_nr; | 1357 | cpm_reg.nr = cpm_uart_nr; |
1360 | ret = uart_register_driver(&cpm_reg); | 1358 | ret = uart_register_driver(&cpm_reg); |
@@ -1366,6 +1364,8 @@ static int cpm_uart_init(void) { | |||
1366 | int con = cpm_uart_port_map[i]; | 1364 | int con = cpm_uart_port_map[i]; |
1367 | cpm_uart_ports[con].port.line = i; | 1365 | cpm_uart_ports[con].port.line = i; |
1368 | cpm_uart_ports[con].port.flags = UPF_BOOT_AUTOCONF; | 1366 | cpm_uart_ports[con].port.flags = UPF_BOOT_AUTOCONF; |
1367 | if (cpm_uart_ports[con].set_lineif) | ||
1368 | cpm_uart_ports[con].set_lineif(&cpm_uart_ports[con]); | ||
1369 | uart_add_one_port(&cpm_reg, &cpm_uart_ports[con].port); | 1369 | uart_add_one_port(&cpm_reg, &cpm_uart_ports[con].port); |
1370 | } | 1370 | } |
1371 | 1371 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c index 95afc37297..08e55fdc88 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c | |||
@@ -184,7 +184,7 @@ void cpm_uart_freebuf(struct uart_cpm_port *pinfo) | |||
184 | } | 184 | } |
185 | 185 | ||
186 | /* Setup any dynamic params in the uart desc */ | 186 | /* Setup any dynamic params in the uart desc */ |
187 | int cpm_uart_init_portdesc(void) | 187 | int __init cpm_uart_init_portdesc(void) |
188 | { | 188 | { |
189 | pr_debug("CPM uart[-]:init portdesc\n"); | 189 | pr_debug("CPM uart[-]:init portdesc\n"); |
190 | 190 | ||