PERFORCE change 157831 for review

Andrew Turner andrew at FreeBSD.org
Mon Feb 16 23:35:53 PST 2009


http://perforce.freebsd.org/chv.cgi?CH=157831

Change 157831 by andrew at andrew_bender on 2009/02/17 07:35:46

	Only set SER_INT_TXIDLE when we are busy.
	This if statement could be removed as we are never busy as s3c2410_putc will block when the FIFO is not empty which means we only ever have 1 character in it.

Affected files ...

.. //depot/projects/arm/src/sys/arm/s3c2xx0/uart_dev_s3c2410.c#8 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/s3c2xx0/uart_dev_s3c2410.c#8 (text+ko) ====

@@ -254,7 +254,6 @@
 		s3c2410_putc(&sc->sc_bas, sc->sc_txbuf[i]);
 		uart_barrier(&sc->sc_bas);
 	}
-	sc->sc_txbusy = 1;
 	uart_unlock(sc->sc_hwmtx);
 
 	return (0);
@@ -298,7 +297,7 @@
 	utrstat = uart_getreg(&sc->sc_bas, SSCOM_UTRSTAT);
 	uart_unlock(sc->sc_hwmtx);
 
-	if ((utrstat & UTRSTAT_TXEMPTY) == UTRSTAT_TXEMPTY) {
+	if ((utrstat & UTRSTAT_TXEMPTY) == UTRSTAT_TXEMPTY && sc->sc_txbusy != 0) {
 		ipend |= SER_INT_TXIDLE;
 	}
 	if ((utrstat & UTRSTAT_RXREADY) == UTRSTAT_RXREADY) {
@@ -325,6 +324,7 @@
 {
 	return (EINVAL);
 }
+
 struct uart_class uart_s3c2410_class = {
 	"s3c2410 class",
 	s3c2410_methods,


More information about the p4-projects mailing list