From 8da3ff180974732fc4272cb4433fef85c1822961 Mon Sep 17 00:00:00 2001 From: pbrook Date: Mon, 1 Dec 2008 18:59:50 +0000 Subject: Change MMIO callbacks to use offsets, not absolute addresses. Signed-off-by: Paul Brook git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/tc6393xb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'hw/tc6393xb.c') 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, -- cgit v1.2.1