diff mbox

sh-sci: fixed serial driver not waiting for last character being transmitted before shutting down

Message ID 95F51F4B902CAC40AF459205F6322F015EFBC7CD2F@BMK019S01.emtrion.local (mailing list archive)
State Awaiting Upstream
Delegated to: Paul Mundt
Headers show

Commit Message

Pietrek, Markus Jan. 11, 2010, 12:46 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 3d0b0ee..e218000 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -352,6 +352,9 @@  static void sci_transmit_chars(struct uart_port *port)
        else
                count = scif_txroom(port);

+       if (port->type == PORT_SCIF)
+               sci_out(port, SCxSR, SCxSR_TEND_CLEAR(port));
+
        do {
                unsigned char c;

diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h
index 0efcded..1e9c44b 100644
--- a/drivers/serial/sh-sci.h
+++ b/drivers/serial/sh-sci.h
@@ -271,6 +271,7 @@ 
 # define SCxSR_ERROR_CLEAR(port) (((port)->type == PORT_SCI) ? 0xc4 : 0x0073)
 # define SCxSR_TDxE_CLEAR(port)  (((port)->type == PORT_SCI) ? 0x78 : 0x00df)
 # define SCxSR_BREAK_CLEAR(port) (((port)->type == PORT_SCI) ? 0xc4 : 0x00e3)
+# define SCxSR_TEND_CLEAR(port)  (0x00bf)
 #endif

 /* SCFCR */