public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC patch] sci_tx_empty for scif serial device
@ 2009-04-21 12:08 Michael Trimarchi
  2009-04-22  0:34 ` Paul Mundt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Trimarchi @ 2009-04-21 12:08 UTC (permalink / raw)
  To: linux-sh

Add the sci_tx_empty function for scif serial device.

Signed-off-by: Michael Trimarchi <trimarchi@gandalf.sssup.it>
---
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;
 }

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

end of thread, other threads:[~2009-04-22 11:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-21 12:08 [RFC patch] sci_tx_empty for scif serial device Michael Trimarchi
2009-04-22  0:34 ` Paul Mundt
2009-04-22  6:14 ` Michael Trimarchi
2009-04-22 11:33 ` Michael Trimarchi

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