diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-01 18:59:50 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-01 18:59:50 +0000 |
commit | 8da3ff180974732fc4272cb4433fef85c1822961 (patch) | |
tree | f23cfaffa61efb36aa46dfeb771ad33cbfd4f3aa /hw/tc6393xb.c | |
parent | 6ad1d22b15c0a091edb1d8efc983c1d75f74ef45 (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/tc6393xb.c')
-rw-r--r-- | hw/tc6393xb.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/tc6393xb.c b/hw/tc6393xb.c index 3af791fab5..a5fed5f1a1 100644 --- a/hw/tc6393xb.c +++ b/hw/tc6393xb.c @@ -79,7 +79,6 @@ #define NAND_MODE_ECC_RST 0x60 struct tc6393xb_s { - target_phys_addr_t target_base; qemu_irq irq; qemu_irq *sub_irqs; struct { @@ -498,7 +497,6 @@ static void tc6393xb_update_display(void *opaque) static uint32_t tc6393xb_readb(void *opaque, target_phys_addr_t addr) { struct tc6393xb_s *s = opaque; - addr -= s->target_base; switch (addr >> 8) { case 0: @@ -520,7 +518,6 @@ static uint32_t tc6393xb_readb(void *opaque, target_phys_addr_t addr) { static void tc6393xb_writeb(void *opaque, target_phys_addr_t addr, uint32_t value) { struct tc6393xb_s *s = opaque; - addr -= s->target_base; switch (addr >> 8) { case 0: @@ -582,7 +579,6 @@ struct tc6393xb_s *tc6393xb_init(uint32_t base, qemu_irq irq, DisplayState *ds) }; s = (struct tc6393xb_s *) qemu_mallocz(sizeof(struct tc6393xb_s)); - s->target_base = base; s->irq = irq; s->gpio_in = qemu_allocate_irqs(tc6393xb_gpio_set, s, TC6393XB_GPIOS); @@ -595,12 +591,12 @@ struct tc6393xb_s *tc6393xb_init(uint32_t base, qemu_irq irq, DisplayState *ds) iomemtype = cpu_register_io_memory(0, tc6393xb_readfn, tc6393xb_writefn, s); - cpu_register_physical_memory(s->target_base, 0x10000, iomemtype); + cpu_register_physical_memory(base, 0x10000, iomemtype); if (ds) { s->ds = ds; s->vram_addr = qemu_ram_alloc(0x100000); - cpu_register_physical_memory(s->target_base + 0x100000, 0x100000, s->vram_addr); + cpu_register_physical_memory(base + 0x100000, 0x100000, s->vram_addr); s->scr_width = 480; s->scr_height = 640; s->console = graphic_console_init(ds, |