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/cs4231.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/cs4231.c')
-rw-r--r-- | hw/cs4231.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/cs4231.c b/hw/cs4231.c index 8ba8253945..d53f194a5b 100644 --- a/hw/cs4231.c +++ b/hw/cs4231.c @@ -30,8 +30,7 @@ /* * In addition to Crystal CS4231 there is a DMA controller on Sparc. */ -#define CS_MAXADDR 0x3f -#define CS_SIZE (CS_MAXADDR + 1) +#define CS_SIZE 0x40 #define CS_REGS 16 #define CS_DREGS 32 #define CS_MAXDREG (CS_DREGS - 1) @@ -68,7 +67,7 @@ static uint32_t cs_mem_readl(void *opaque, target_phys_addr_t addr) CSState *s = opaque; uint32_t saddr, ret; - saddr = (addr & CS_MAXADDR) >> 2; + saddr = addr >> 2; switch (saddr) { case 1: switch (CS_RAP(s)) { @@ -94,7 +93,7 @@ static void cs_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val) CSState *s = opaque; uint32_t saddr; - saddr = (addr & CS_MAXADDR) >> 2; + saddr = addr >> 2; DPRINTF("write reg[%d]: 0x%8.8x -> 0x%8.8x\n", saddr, s->regs[saddr], val); switch (saddr) { case 1: |