aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index bde4b4b0b80f..5c6ef51da274 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -406,6 +406,18 @@ static int cpm_uart_startup(struct uart_port *port)
406 406
407 pr_debug("CPM uart[%d]:startup\n", port->line); 407 pr_debug("CPM uart[%d]:startup\n", port->line);
408 408
409 /* If the port is not the console, make sure rx is disabled. */
410 if (!(pinfo->flags & FLAG_CONSOLE)) {
411 /* Disable UART rx */
412 if (IS_SMC(pinfo)) {
413 clrbits16(&pinfo->smcp->smc_smcmr, SMCMR_REN);
414 clrbits8(&pinfo->smcp->smc_smcm, SMCM_RX);
415 } else {
416 clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR);
417 clrbits16(&pinfo->sccp->scc_sccm, UART_SCCM_RX);
418 }
419 cpm_line_cr_cmd(pinfo, CPM_CR_INIT_TRX);
420 }
409 /* Install interrupt handler. */ 421 /* Install interrupt handler. */
410 retval = request_irq(port->irq, cpm_uart_int, 0, "cpm_uart", port); 422 retval = request_irq(port->irq, cpm_uart_int, 0, "cpm_uart", port);
411 if (retval) 423 if (retval)
@@ -420,8 +432,6 @@ static int cpm_uart_startup(struct uart_port *port)
420 setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); 432 setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT));
421 } 433 }
422 434
423 if (!(pinfo->flags & FLAG_CONSOLE))
424 cpm_line_cr_cmd(pinfo, CPM_CR_INIT_TRX);
425 return 0; 435 return 0;
426} 436}
427 437