From patchwork Mon Mar 29 13:16:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars Munch X-Patchwork-Id: 48840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 75490B7CE7 for ; Tue, 30 Mar 2010 00:27:30 +1100 (EST) Received: from localhost ([127.0.0.1]:54400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwEwg-0007kH-3R for incoming@patchwork.ozlabs.org; Mon, 29 Mar 2010 09:23:58 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwEqC-0004sH-K7 for qemu-devel@nongnu.org; Mon, 29 Mar 2010 09:17:16 -0400 Received: from [140.186.70.92] (port=46256 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwEqB-0004rT-0A for qemu-devel@nongnu.org; Mon, 29 Mar 2010 09:17:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwEq9-0007U9-Li for qemu-devel@nongnu.org; Mon, 29 Mar 2010 09:17:14 -0400 Received: from pasmtpb.tele.dk ([80.160.77.98]:43806) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwEq9-0007Tt-Fz for qemu-devel@nongnu.org; Mon, 29 Mar 2010 09:17:13 -0400 Received: from firewall (0x535c82dc.virnxx18.dynamic.dsl.tele.dk [83.92.130.220]) by pasmtpB.tele.dk (Postfix) with ESMTP id 88E1CE306AB; Mon, 29 Mar 2010 15:17:10 +0200 (CEST) Received: from localhost.localdomain (unknown [10.0.0.49]) by firewall (Postfix) with ESMTP id 6879F3E8D; Mon, 29 Mar 2010 15:17:10 +0200 (CEST) Received: by localhost.localdomain (Postfix, from userid 1000) id 2BE7CD47D5; Mon, 29 Mar 2010 15:17:10 +0200 (CEST) From: Lars Munch To: qemu-devel@nongnu.org Date: Mon, 29 Mar 2010 15:16:58 +0200 Message-Id: <1269868618-22654-1-git-send-email-lars@segv.dk> X-Mailer: git-send-email 1.7.0.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Lars Munch Subject: [Qemu-devel] [PATCH] smc91c111: mask register offset X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org this fixes the smc91c111 emulation which has been broken for gumstix and mainstone and maybe others since the "MMIO callback interface changes" 8da3ff180974732fc4272cb4433fef85c1822961 where commited, see: http://thread.gmane.org/gmane.comp.emulators.qemu/33607/focus=35194 Signed-off-by: Lars Munch --- hw/smc91c111.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/smc91c111.c b/hw/smc91c111.c index c1a88c9..a2ef299 100644 --- a/hw/smc91c111.c +++ b/hw/smc91c111.c @@ -250,6 +250,7 @@ static void smc91c111_writeb(void *opaque, target_phys_addr_t offset, { smc91c111_state *s = (smc91c111_state *)opaque; + offset = offset & 0xf; if (offset == 14) { s->bank = value; return; @@ -421,6 +422,7 @@ static uint32_t smc91c111_readb(void *opaque, target_phys_addr_t offset) { smc91c111_state *s = (smc91c111_state *)opaque; + offset = offset & 0xf; if (offset == 14) { return s->bank; }