From patchwork Mon Jan 11 12:46:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pietrek, Markus" X-Patchwork-Id: 72143 X-Patchwork-Delegate: lethal@linux-sh.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0BCkLsr030932 for ; Mon, 11 Jan 2010 12:46:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753026Ab0AKMqV (ORCPT ); Mon, 11 Jan 2010 07:46:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753237Ab0AKMqV (ORCPT ); Mon, 11 Jan 2010 07:46:21 -0500 Received: from mail3.emtrion.de ([80.150.99.69]:46387 "EHLO mail3.emtrion.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753026Ab0AKMqU convert rfc822-to-8bit (ORCPT ); Mon, 11 Jan 2010 07:46:20 -0500 Received: from BMK019S01.emtrion.local ([fe80::4a1:cedc:cab6:e9ce]) by BMK019S01.emtrion.local ([fe80::4a1:cedc:cab6:e9ce%10]) with mapi; Mon, 11 Jan 2010 13:46:18 +0100 From: "Pietrek, Markus" To: "linux-sh@vger.kernel.org" Date: Mon, 11 Jan 2010 13:46:16 +0100 Subject: [PATCH] sh-sci: fixed serial driver not waiting for last character being transmitted before shutting down Thread-Topic: [PATCH] sh-sci: fixed serial driver not waiting for last character being transmitted before shutting down Thread-Index: AcqSvBDqciS9rb39TFWhZ4ki2Mqlug== Message-ID: <95F51F4B902CAC40AF459205F6322F015EFBC7CD2F@BMK019S01.emtrion.local> Accept-Language: de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE x-tm-as-product-ver: SMEX-8.0.0.1307-6.000.1038-17124.007 x-tm-as-result: No--40.713400-8.000000-31 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org 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 */