diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-02 17:47:02 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-02 17:47:02 +0000 |
commit | e64d7d595f9454d29de7110e3ec6591105c8e467 (patch) | |
tree | 26eaa11fc8ea8b8817b0e6e99fabaa8af196973a /hw/slavio_serial.c | |
parent | 0e8f096751f279a8de01d9c66c87911ec431fa4c (diff) |
Remove address masking
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5853 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/slavio_serial.c')
-rw-r--r-- | hw/slavio_serial.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/slavio_serial.c b/hw/slavio_serial.c index 9f5843af68..1028ed944c 100644 --- a/hw/slavio_serial.c +++ b/hw/slavio_serial.c @@ -108,8 +108,7 @@ struct SerialState { struct ChannelState chn[2]; }; -#define SERIAL_MAXADDR 7 -#define SERIAL_SIZE (SERIAL_MAXADDR + 1) +#define SERIAL_SIZE 8 #define SERIAL_CTRL 0 #define SERIAL_DATA 1 @@ -477,7 +476,7 @@ static void slavio_serial_mem_writeb(void *opaque, target_phys_addr_t addr, val &= 0xff; saddr = (addr & 3) >> 1; - channel = (addr & SERIAL_MAXADDR) >> 2; + channel = addr >> 2; s = &serial->chn[channel]; switch (saddr) { case SERIAL_CTRL: @@ -574,7 +573,7 @@ static uint32_t slavio_serial_mem_readb(void *opaque, target_phys_addr_t addr) int channel; saddr = (addr & 3) >> 1; - channel = (addr & SERIAL_MAXADDR) >> 2; + channel = addr >> 2; s = &serial->chn[channel]; switch (saddr) { case SERIAL_CTRL: |