qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/3] Scoop: fix access to registers from second instance
Date: Thu, 13 Jan 2011 18:37:11 +0300	[thread overview]
Message-ID: <1294933032-12757-2-git-send-email-dbaryshkov@gmail.com> (raw)
In-Reply-To: <1294933032-12757-1-git-send-email-dbaryshkov@gmail.com>

Second instance of scoop contains registers shifted to 0x40 from the start
of the page. Instead of messing with register mapping, just limit register
address to 0x00..0x3f.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 hw/zaurus.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/zaurus.c b/hw/zaurus.c
index 54ec3f0..36be94a 100644
--- a/hw/zaurus.c
+++ b/hw/zaurus.c
@@ -70,7 +70,7 @@ static uint32_t scoop_readb(void *opaque, target_phys_addr_t addr)
 {
     ScoopInfo *s = (ScoopInfo *) opaque;
 
-    switch (addr) {
+    switch (addr & 0x3f) {
     case SCOOP_MCR:
         return s->mcr;
     case SCOOP_CDR:
@@ -104,7 +104,7 @@ static void scoop_writeb(void *opaque, target_phys_addr_t addr, uint32_t value)
     ScoopInfo *s = (ScoopInfo *) opaque;
     value &= 0xffff;
 
-    switch (addr) {
+    switch (addr & 0x3f) {
     case SCOOP_MCR:
         s->mcr = value;
         break;
-- 
1.7.2.3

  reply	other threads:[~2011-01-13 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 15:37 [Qemu-devel] [PATCH 1/3] mainstone: fix name of the allocated memory for roms Dmitry Eremin-Solenikov
2011-01-13 15:37 ` Dmitry Eremin-Solenikov [this message]
2011-01-13 15:37 ` [Qemu-devel] [PATCH 3/3] pxa2xx: fix vmstate_pxa2xx_i2c Dmitry Eremin-Solenikov
2011-01-17 23:09 ` [Qemu-devel] Re: [PATCH 1/3] mainstone: fix name of the allocated memory for roms Dmitry Eremin-Solenikov
2011-01-20 11:45 ` [Qemu-devel] " Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294933032-12757-2-git-send-email-dbaryshkov@gmail.com \
    --to=dbaryshkov@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).