From patchwork Tue Apr 21 12:08:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 19160 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3LC2OrX018202 for ; Tue, 21 Apr 2009 12:02:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869AbZDUMCY (ORCPT ); Tue, 21 Apr 2009 08:02:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753950AbZDUMCY (ORCPT ); Tue, 21 Apr 2009 08:02:24 -0400 Received: from ms01.sssup.it ([193.205.80.99]:55293 "EHLO sssup.it" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753869AbZDUMCX (ORCPT ); Tue, 21 Apr 2009 08:02:23 -0400 Received: from [193.205.82.7] (HELO gandalf.sssup.it) by sssup.it (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 50145954; Tue, 21 Apr 2009 13:54:55 +0200 Received: from smaug.retis (smaug.retis [10.30.3.72]) by gandalf.sssup.it (8.12.10/8.12.10) with ESMTP id n3LC2Kxi018663; Tue, 21 Apr 2009 14:02:20 +0200 Received: by smaug.retis (Postfix, from userid 1006) id 3AB2C538C3; Tue, 21 Apr 2009 14:08:47 +0200 (CEST) Date: Tue, 21 Apr 2009 14:08:47 +0200 From: Michael Trimarchi To: linux-sh@vger.kernel.org Cc: lethal@linux-sh.org Subject: [RFC patch] sci_tx_empty for scif serial device Message-ID: <20090421120846.GA26186@gandalf.sssup.it> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Add the sci_tx_empty function for scif serial device. Signed-off-by: Michael Trimarchi --- -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index dbf5357..6cea2c4 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -794,6 +794,20 @@ static void sci_free_irq(struct sci_port *port) static unsigned int sci_tx_empty(struct uart_port *port) { + int txroom = SCIF_TXROOM_MAX; + +#if defined(CONFIG_CPU_SUBTYPE_SH7763) + if (!(port->mapbase == 0xffe00000) && + !(port->mapbase == 0xffe08000)) { + txroom == SCIF2_TXROOM_MAX) + } +#endif + if (port->type == PORT_SCIF) { + if (scif_txroom(port) == txroom) + return TIOCSER_TEMT; + return 0; + } + /* Can't detect */ return TIOCSER_TEMT; }