summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorKalle Pokki <kalle.pokki@iki.fi>2006-11-01 09:52:41 +0200
committerPaul Mackerras <paulus@samba.org>2006-11-10 21:26:40 +1100
commit599540a85595bd5950354bd95f5ebf9c6e07c971 (patch)
treef16b0060d002f22be5d061d82a2a210d90aa82d5 /drivers/serial
parent621da0f8af228525e4b40390e36fbdc44a587cf1 (diff)
downloadblackbird-op-linux-599540a85595bd5950354bd95f5ebf9c6e07c971.tar.gz
blackbird-op-linux-599540a85595bd5950354bd95f5ebf9c6e07c971.zip
[POWERPC] CPM_UART: Fix non-console transmit
The SMC and SCC hardware transmitter is enabled at the wrong place. Simply writing twice to the non-console port, like $ echo asdf > /dev/ttyCPM1 $ echo asdf > /dev/ttyCPM1 puts the shell into endless uninterruptible sleep, since the transmitter is stopped after the first write, and is not enabled before the shutdown function of the second write. Thus the transmit buffers are never emptied. Signed-off-by: Kalle Pokki <kalle.pokki@iki.fi> Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 0abb544ae63d..32fd8c83bd8e 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)
if (cpm_uart_tx_pump(port) != 0) {
if (IS_SMC(pinfo)) {
smcp->smc_smcm |= SMCM_TX;
- smcp->smc_smcmr |= SMCMR_TEN;
} else {
sccp->scc_sccm |= UART_SCCM_TX;
- pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT;
}
}
}
@@ -421,9 +419,10 @@ static int cpm_uart_startup(struct uart_port *port)
/* Startup rx-int */
if (IS_SMC(pinfo)) {
pinfo->smcp->smc_smcm |= SMCM_RX;
- pinfo->smcp->smc_smcmr |= SMCMR_REN;
+ pinfo->smcp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN);
} else {
pinfo->sccp->scc_sccm |= UART_SCCM_RX;
+ pinfo->sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT);
}
if (!(pinfo->flags & FLAG_CONSOLE))
OpenPOWER on IntegriCloud