summaryrefslogtreecommitdiff
path: root/hw/stellaris_enet.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/stellaris_enet.c
parent6ad1d22b15c0a091edb1d8efc983c1d75f74ef45 (diff)
downloadqemu-8da3ff180974732fc4272cb4433fef85c1822961.tar.gz
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/stellaris_enet.c')
-rw-r--r--hw/stellaris_enet.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c
index 8057f80f31..09d92b1344 100644
--- a/hw/stellaris_enet.c
+++ b/hw/stellaris_enet.c
@@ -44,7 +44,6 @@ do { fprintf(stderr, "stellaris_enet: error: " fmt , ##args);} while (0)
#define SE_TCTL_DUPLEX 0x08
typedef struct {
- uint32_t base;
uint32_t ris;
uint32_t im;
uint32_t rctl;
@@ -133,7 +132,6 @@ static uint32_t stellaris_enet_read(void *opaque, target_phys_addr_t offset)
stellaris_enet_state *s = (stellaris_enet_state *)opaque;
uint32_t val;
- offset -= s->base;
switch (offset) {
case 0x00: /* RIS */
DPRINTF("IRQ status %02x\n", s->ris);
@@ -202,7 +200,6 @@ static void stellaris_enet_write(void *opaque, target_phys_addr_t offset,
{
stellaris_enet_state *s = (stellaris_enet_state *)opaque;
- offset -= s->base;
switch (offset) {
case 0x00: /* IACK */
s->ris &= ~value;
@@ -396,7 +393,6 @@ void stellaris_enet_init(NICInfo *nd, uint32_t base, qemu_irq irq)
iomemtype = cpu_register_io_memory(0, stellaris_enet_readfn,
stellaris_enet_writefn, s);
cpu_register_physical_memory(base, 0x00001000, iomemtype);
- s->base = base;
s->irq = irq;
memcpy(s->macaddr, nd->macaddr, 6);