aboutsummaryrefslogtreecommitdiff
path: root/hw/mac_nvram.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/mac_nvram.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/mac_nvram.c')
-rw-r--r--hw/mac_nvram.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/hw/mac_nvram.c b/hw/mac_nvram.c
index 7304ac27e0..f608ace71d 100644
--- a/hw/mac_nvram.c
+++ b/hw/mac_nvram.c
@@ -26,7 +26,6 @@
#include "ppc_mac.h"
struct MacIONVRAMState {
- target_phys_addr_t mem_base;
target_phys_addr_t size;
int mem_index;
uint8_t data[0x2000];
@@ -62,7 +61,6 @@ static void macio_nvram_writeb (void *opaque,
{
MacIONVRAMState *s = opaque;
- addr -= s->mem_base;
addr = (addr >> 4) & 0x1fff;
s->data[addr] = value;
// printf("macio_nvram_writeb %04x = %02x\n", addr, value);
@@ -73,7 +71,6 @@ static uint32_t macio_nvram_readb (void *opaque, target_phys_addr_t addr)
MacIONVRAMState *s = opaque;
uint32_t value;
- addr -= s->mem_base;
addr = (addr >> 4) & 0x1fff;
value = s->data[addr];
// printf("macio_nvram_readb %04x = %02x\n", addr, value);
@@ -112,7 +109,6 @@ void macio_nvram_map (void *opaque, target_phys_addr_t mem_base)
MacIONVRAMState *s;
s = opaque;
- s->mem_base = mem_base;
cpu_register_physical_memory(mem_base, s->size, s->mem_index);
}