aboutsummaryrefslogtreecommitdiff
path: root/hw/smc91c111.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-01 18:59:50 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-01 18:59:50 +0000
commit8da3ff180974732fc4272cb4433fef85c1822961 (patch)
treef23cfaffa61efb36aa46dfeb771ad33cbfd4f3aa /hw/smc91c111.c
parent6ad1d22b15c0a091edb1d8efc983c1d75f74ef45 (diff)
Change MMIO callbacks to use offsets, not absolute addresses.
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/smc91c111.c')
-rw-r--r--hw/smc91c111.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/hw/smc91c111.c b/hw/smc91c111.c
index 410051d3cc..a517033b71 100644
--- a/hw/smc91c111.c
+++ b/hw/smc91c111.c
@@ -17,7 +17,6 @@
#define NUM_PACKETS 4
typedef struct {
- uint32_t base;
VLANClientState *vc;
uint16_t tcr;
uint16_t rcr;
@@ -249,7 +248,6 @@ static void smc91c111_writeb(void *opaque, target_phys_addr_t offset,
{
smc91c111_state *s = (smc91c111_state *)opaque;
- offset -= s->base;
if (offset == 14) {
s->bank = value;
return;
@@ -422,7 +420,6 @@ static uint32_t smc91c111_readb(void *opaque, target_phys_addr_t offset)
{
smc91c111_state *s = (smc91c111_state *)opaque;
- offset -= s->base;
if (offset == 14) {
return s->bank;
}
@@ -571,10 +568,9 @@ static void smc91c111_writew(void *opaque, target_phys_addr_t offset,
static void smc91c111_writel(void *opaque, target_phys_addr_t offset,
uint32_t value)
{
- smc91c111_state *s = (smc91c111_state *)opaque;
/* 32-bit writes to offset 0xc only actually write to the bank select
register (offset 0xe) */
- if (offset != s->base + 0xc)
+ if (offset != 0xc)
smc91c111_writew(opaque, offset, value & 0xffff);
smc91c111_writew(opaque, offset + 2, value >> 16);
}
@@ -703,7 +699,6 @@ void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq)
iomemtype = cpu_register_io_memory(0, smc91c111_readfn,
smc91c111_writefn, s);
cpu_register_physical_memory(base, 16, iomemtype);
- s->base = base;
s->irq = irq;
memcpy(s->macaddr, nd->macaddr, 6);