qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [5939] SH4: SCI improvement
@ 2008-12-07 22:46 Aurelien Jarno
  0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2008-12-07 22:46 UTC (permalink / raw)
  To: qemu-devel

Revision: 5939
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5939
Author:   aurel32
Date:     2008-12-07 22:46:49 +0000 (Sun, 07 Dec 2008)

Log Message:
-----------
SH4: SCI improvement

This patch simply implement one register of SH4's SCI := Serial Communication Interface.

R2D evaluation board uses SCI for SPI connection.  So, Linux kernel for R2D with
default configuration causes a QEMU assertion failure when it initializes SPI driver.
This patch avoids it and reduces the kernel config modification work for QEMU.

Completing SCI implementation task is left.  Other board support is desirable to confirm
this task, which uses SCI for a serial terminal.

(Shin-ichiro KAWASAKI)

Modified Paths:
--------------
    trunk/hw/sh_serial.c

Modified: trunk/hw/sh_serial.c
===================================================================
--- trunk/hw/sh_serial.c	2008-12-07 22:46:42 UTC (rev 5938)
+++ trunk/hw/sh_serial.c	2008-12-07 22:46:49 UTC (rev 5939)
@@ -167,19 +167,19 @@
         }
     }
     else {
+        switch(offs) {
 #if 0
-        switch(offs) {
         case 0x0c:
             ret = s->dr;
             break;
         case 0x10:
             ret = 0;
             break;
+#endif
         case 0x1c:
-            ret = s->sptr;
-            break;
+            s->sptr = val & 0x8f;
+            return;
         }
-#endif
     }
 
     fprintf(stderr, "sh_serial: unsupported write to 0x%02x\n", offs);
@@ -259,8 +259,8 @@
         }
     }
     else {
+        switch(offs) {
 #if 0
-        switch(offs) {
         case 0x0c:
             ret = s->dr;
             break;
@@ -270,11 +270,11 @@
         case 0x14:
             ret = s->rx_fifo[0];
             break;
+#endif
         case 0x1c:
             ret = s->sptr;
             break;
         }
-#endif
     }
 #ifdef DEBUG_SERIAL
     printf("sh_serial: read offs=0x%02x val=0x%x\n",

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-07 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-07 22:46 [Qemu-devel] [5939] SH4: SCI improvement Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).