aboutsummaryrefslogtreecommitdiff
path: root/hw/sh_serial.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-07 22:46:49 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-07 22:46:49 +0000
commitd1f193b0edb919ab109f88c53469ec9073f2e142 (patch)
tree17222212e1d848153a2efe2da933ceadb2877c3d /hw/sh_serial.c
parentb79e175259bd3591cc3abd1ebe8551573927cd56 (diff)
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) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5939 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sh_serial.c')
-rw-r--r--hw/sh_serial.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/sh_serial.c b/hw/sh_serial.c
index 843031e8a5..da1a2ca7ce 100644
--- a/hw/sh_serial.c
+++ b/hw/sh_serial.c
@@ -167,19 +167,19 @@ static void sh_serial_ioport_write(void *opaque, uint32_t offs, uint32_t val)
}
}
else {
-#if 0
switch(offs) {
+#if 0
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 @@ static uint32_t sh_serial_ioport_read(void *opaque, uint32_t offs)
}
}
else {
-#if 0
switch(offs) {
+#if 0
case 0x0c:
ret = s->dr;
break;
@@ -270,11 +270,11 @@ static uint32_t sh_serial_ioport_read(void *opaque, uint32_t offs)
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",