Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2008 08:58:37 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 144132 for review
Message-ID:  <200806260858.m5Q8wbmb067819@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=144132

Change 144132 by andrew@andrew_bender on 2008/06/26 08:58:02

	Implement the transmit side of uart's uart_ipend and uart_transmit
	
	With this (and some other workarounds) I'm able to get init writing out to the uart on the NEO 1973 emulator

Affected files ...

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

Differences ...

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

@@ -190,6 +190,11 @@
 static int
 s3c2410_bus_transmit(struct uart_softc *sc)
 {
+	sc->sc_txbusy = 1;
+	for (int i = 0; i < sc->sc_txdatasz; i++) {
+		s3c2410_putc(&sc->sc_bas, sc->sc_txbuf[i]);
+		uart_barrier(&sc->sc_bas);
+	}
 
 	return (0);
 }
@@ -214,7 +219,16 @@
 static int
 s3c2410_bus_ipend(struct uart_softc *sc)
 {
-	return (0);
+	int ipend = 0;
+	int sr;
+
+	sr = uart_getreg(&sc->sc_bas, SSCOM_UTRSTAT);
+
+	if (sr & UTRSTAT_TXEMPTY && sc->sc_txbusy) {
+		ipend |= SER_INT_TXIDLE;
+	}
+
+	return (ipend);
 }
 static int
 s3c2410_bus_flush(struct uart_softc *sc, int what)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806260858.m5Q8wbmb067819>