PERFORCE change 144132 for review
Andrew Turner
andrew at FreeBSD.org
Thu Jun 26 08:58:38 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=144132
Change 144132 by andrew at 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)
More information about the p4-projects
mailing list