scoop: fix access to registers from second instance

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>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Dmitry Eremin-Solenikov 2011-01-13 18:37:11 +03:00 committed by Aurelien Jarno
parent f75d216a80
commit aa9438d9f8
1 changed files with 2 additions and 2 deletions

View File

@ -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;