smc91c111: mask register offset
PATCH 1/1 smc91c111: mask register offset
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 <[email protected]>
--- hw/smc91c111.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
hw/smc91c111.c +2 -0
@@ -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; }
Signature · 1 line
1.7.0.3
Aurelien Jarno
AppliedQuoted 5 lines · Lars Munch
this fixes the smc91c111 emulation which has been broken for gumstix and mainstone and maybe others since the "MMIO callback interface changes"
8da3ff180974732fc4272cb4433fef85c1822961where commited, see:http://thread.gmane.org/gmane.comp.emulators.qemu/33607/focus=35194
Thanks, applied.
Quoted 31 lines
Signed-off-by Lars Munch <[email protected]>--- hw/smc91c111.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)hw/smc91c111.c +2
-0@@ -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; }Signature · 1 line
1.7.0.3
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net