From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4G9U-00057N-2D for qemu-devel@nongnu.org; Sun, 23 Nov 2008 09:41:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4G9T-00057B-BY for qemu-devel@nongnu.org; Sun, 23 Nov 2008 09:41:31 -0500 Received: from [199.232.76.173] (port=44646 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4G9T-000578-88 for qemu-devel@nongnu.org; Sun, 23 Nov 2008 09:41:31 -0500 Received: from vsmtp04.dti.ne.jp ([202.216.231.139]:57729) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L4G9T-0002VT-80 for qemu-devel@nongnu.org; Sun, 23 Nov 2008 09:41:31 -0500 Received: from [192.168.1.21] (PPPa1787.e11.eacc.dti.ne.jp [124.255.93.17]) by vsmtp04.dti.ne.jp (3.11v) with ESMTP AUTH id mANEfPVd025208 for ; Sun, 23 Nov 2008 23:41:25 +0900 (JST) Message-ID: <49296B95.4020707@juno.dti.ne.jp> Date: Sun, 23 Nov 2008 23:41:25 +0900 From: Shin-ichiro KAWASAKI MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] SH4: SCI improvement Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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. Regards, Shin-ichiro KAWASAKI Signed-off-by: Shin-ichiro KAWASAKI Index: trunk/hw/sh_serial.c =================================================================== --- trunk/hw/sh_serial.c (revision 5771) +++ trunk/hw/sh_serial.c (working copy) @@ -168,19 +168,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); @@ -260,8 +260,8 @@ } } else { + switch(offs) { #if 0 - switch(offs) { case 0x0c: ret = s->dr; break; @@ -271,11 +271,11 @@ case 0x14: ret = s->rx_fifo[0]; break; +#endif case 0x1c: ret = s->sptr; break; } -#endif } #ifdef DEBUG_SERIAL printf("sh_serial: read base=0x%08lx offs=0x%02x val=0x%x\n",