[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>

authored by Kalle Pokki and committed by Paul Mackerras 599540a8 621da0f8

+2 -3
+2 -3
drivers/serial/cpm_uart/cpm_uart_core.c
··· 195 if (cpm_uart_tx_pump(port) != 0) { 196 if (IS_SMC(pinfo)) { 197 smcp->smc_smcm |= SMCM_TX; 198 - smcp->smc_smcmr |= SMCMR_TEN; 199 } else { 200 sccp->scc_sccm |= UART_SCCM_TX; 201 - pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT; 202 } 203 } 204 } ··· 419 /* Startup rx-int */ 420 if (IS_SMC(pinfo)) { 421 pinfo->smcp->smc_smcm |= SMCM_RX; 422 - pinfo->smcp->smc_smcmr |= SMCMR_REN; 423 } else { 424 pinfo->sccp->scc_sccm |= UART_SCCM_RX; 425 } 426 427 if (!(pinfo->flags & FLAG_CONSOLE))
··· 195 if (cpm_uart_tx_pump(port) != 0) { 196 if (IS_SMC(pinfo)) { 197 smcp->smc_smcm |= SMCM_TX; 198 } else { 199 sccp->scc_sccm |= UART_SCCM_TX; 200 } 201 } 202 } ··· 421 /* Startup rx-int */ 422 if (IS_SMC(pinfo)) { 423 pinfo->smcp->smc_smcm |= SMCM_RX; 424 + pinfo->smcp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN); 425 } else { 426 pinfo->sccp->scc_sccm |= UART_SCCM_RX; 427 + pinfo->sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT); 428 } 429 430 if (!(pinfo->flags & FLAG_CONSOLE))