r2335 - trunk/src/host/qemu-neo1973/hw

andrew at sita.openmoko.org andrew at sita.openmoko.org
Sat Jun 23 02:58:07 CEST 2007


Author: andrew
Date: 2007-06-23 02:58:06 +0200 (Sat, 23 Jun 2007)
New Revision: 2335

Modified:
   trunk/src/host/qemu-neo1973/hw/s3c2410.c
Log:
Implement S3C UART RxTimeout interrupt (gsmd's buggy read loop depends on this).


Modified: trunk/src/host/qemu-neo1973/hw/s3c2410.c
===================================================================
--- trunk/src/host/qemu-neo1973/hw/s3c2410.c	2007-06-23 00:55:52 UTC (rev 2334)
+++ trunk/src/host/qemu-neo1973/hw/s3c2410.c	2007-06-23 00:58:06 UTC (rev 2335)
@@ -1320,8 +1320,16 @@
 inline static void s3c_uart_full(struct s3c_uart_state_s *s, int pulse)
 {
     if (s->fcontrol & 1)			/* FIFOEnable */
-        if (s->rxlen < (((s->fcontrol >> 4) & 3) + 1) * 4)
-            return;
+        if (s->rxlen < (((s->fcontrol >> 4) & 3) + 1) * 4) {
+            if (((s->control >> 0) & 3) != 1 ||	/* ReceiveMode */
+                            !s->rxlen)
+                return;
+            if (!(s->control & (1 << 7)))	/* RxTimeOutEnable */
+                return;
+            /* When the Rx FIFO trigger level is not reached, the interrupt
+             * is generated anyway, just after a small timeout instead of
+             * immediately.  */
+        }
 
     switch ((s->control >> 0) & 3) {		/* ReceiveMode */
     case 1:





More information about the commitlog mailing list