LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ppc32: fix: swallowed chars when booting.
@ 2005-11-01  7:22 Heiko Schocher
  0 siblings, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2005-11-01  7:22 UTC (permalink / raw)
  To: linuxppc-dev

Hello,

Sorry, here comes the resubmit of the Patch because
corruption of whitespaces.

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

[PATCH]     ppc32: fix: swallowed chars when booting.

In cpm_uart_set_termios(): wait until all chars are transmitted,
before writing the SMC Mode Register.

Signed-off-by: Heiko Schocher <hs@denx.de>

---
commit d2fcbaa6d5fcb3c1f80c98997dbcf6f6ee075f1b
tree d602dae10d2010ca1506c6a02e6a6db36ac86aca
parent ed28f96ac1960f30f818374d65be71d2fdf811b0
author Heiko Schocher <hs@pollux.(none)> Mon, 31 Oct 2005 12:11:55 +0100
committer Heiko Schocher <hs@pollux.(none)> Mon, 31 Oct 2005 12:11:55 +0100

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

diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c
b/drivers/serial/cpm_uart/cpm_uart_core.c
index 25825f2..a452c38 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -553,6 +553,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 {


\f
!-------------------------------------------------------------flip-

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* Re: [PATCH] ppc32: fix: swallowed chars when booting.
@ 2005-11-02 13:01 Heiko Schocher
  0 siblings, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2005-11-02 13:01 UTC (permalink / raw)
  To: linuxppc-dev

Hello,

during I am searching the right solution for my
other patch, i found another way for solving the
swallowed chars problem when booting on SMC2.

Please comment.

thanks
Heiko Schocher

[PATCH] ppc32:  Fix: swallowed chars on SMC2 Console.

Signed-off-by: Heiko Schocher <hs@denx.de>

---
 drivers/serial/cpm_uart/cpm_uart_core.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c
b/drivers/serial/cpm_uart/cpm_uart_core.c
index 25825f2..baedd74 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -552,9 +552,9 @@ static void cpm_uart_set_termios(struct
 		 * enables, because we want to put them back if they were
 		 * present.
 		 */
-		prev_mode = smcp->smc_smcmr;
-		smcp->smc_smcmr = smcr_mk_clen(bits) | cval | SMCMR_SM_UART;
-		smcp->smc_smcmr |= (prev_mode & (SMCMR_REN | SMCMR_TEN));
+		prev_mode = smcp->smc_smcmr & (SMCMR_REN | SMCMR_TEN);
+		smcp->smc_smcmr = smcr_mk_clen(bits) | cval | SMCMR_SM_UART
+				| prev_mode;
 	} else {
 		sccp->scc_psmr = (sbits << 12) | scval;
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH]     ppc32: fix: swallowed chars when booting.
@ 2005-10-31 11:29 Heiko Schocher
  0 siblings, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2005-10-31 11:29 UTC (permalink / raw)
  To: linuxppc-dev

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

Signed-off-by: Heiko Schocher <hs@denx.de>

---

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

diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c 
b/drivers/serial/cpm_uart/cpm_uart_core.c
index 4c3ea05..ac05ee9 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -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 {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-02 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-01  7:22 [PATCH] ppc32: fix: swallowed chars when booting Heiko Schocher
  -- strict thread matches above, loose matches on Subject: below --
2005-11-02 13:01 Heiko Schocher
2005-10-31 11:29 Heiko Schocher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox