Skip to contentSkip to conversation

ppc32: fix: swallowed chars when booting.

PATCH New Heiko Schocher 1 participant 1 message Oct 31, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc32: fix: swallowed chars when booting.

Hello,

on a MPC8260 based Board, i lost some chars on the SMC2 Console, when booting the kernel. The following Patch will fix this.

thanks
Heiko Schocher

---

 drivers/serial/cpm_uart/cpm_uart_core.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/serial/cpm_uart/cpm_uart_core.c
index 4c3ea05..ac05ee9 100644

drivers/serial/cpm_uart/cpm_uart_core.c +5 -0
@@ -557,6 +557,11 @@ static void cpm_uart_set_termios(struct
                 * present.
                 */
                prev_mode = smcp->smc_smcmr;
+                /* Wait for all the BDs marked sent */
+                while(!cpm_uart_tx_empty(port)) {
+                        set_current_state(TASK_UNINTERRUPTIBLE);
+                        schedule_timeout(4);
+                }
                smcp->smc_smcmr = smcr_mk_clen(bits) | cval | SMCMR_SM_UART;
                smcp->smc_smcmr |= (prev_mode & (SMCMR_REN | SMCMR_TEN));
        } else {