PERFORCE change 144219 for review
Andrew Turner
andrew at FreeBSD.org
Sat Jun 28 00:05:48 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=144219
Change 144219 by andrew at andrew_bender on 2008/06/28 00:04:59
Add support to receive data through the uart driver
Affected files ...
.. //depot/projects/arm/src/sys/arm/s3c2xx0/uart_dev_s3c2410.c#6 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/s3c2xx0/uart_dev_s3c2410.c#6 (text+ko) ====
@@ -109,7 +109,7 @@
brd = sscomspeed(baudrate, bas->rclk);
uart_setreg(bas, SSCOM_UBRDIV, brd);
/* Enable UART. */
- uart_setreg(bas, SSCOM_UCON, UCON_TXMODE_INT|UCON_RXMODE_INT);
+ uart_setreg(bas, SSCOM_UCON, UCON_TXMODE_INT|UCON_RXMODE_INT|UCON_TOINT);
uart_setreg(bas, SSCOM_UMCON, UMCON_RTS);
}
@@ -207,6 +207,7 @@
s3c2410_bus_receive(struct uart_softc *sc)
{
+ uart_rx_put(sc, uart_getreg(&sc->sc_bas, SSCOM_URXH));
return (0);
}
static int
@@ -227,6 +228,10 @@
if ((sr & UFSTAT_TXCOUNT) == 0 && sc->sc_txbusy) {
ipend |= SER_INT_TXIDLE;
}
+ if ((sr & UFSTAT_RXCOUNT) != 0) {
+ ipend |= SER_INT_RXREADY;
+ }
+
return (ipend);
}
static int
More information about the p4-projects
mailing list