Patchwork [20/20,MIPS] qdev: Complete rc4030 conversion, by removing legacy stuff

login
register
mail settings
Submitter Hervé Poussineau
Date Aug. 1, 2010, 5:37 p.m.
Message ID <1280684242-19611-20-git-send-email-hpoussin@reactos.org>
Download mbox | patch
Permalink /patch/60490/
State New
Headers show

Comments

Hervé Poussineau - Aug. 1, 2010, 5:37 p.m.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 hw/mips_jazz.c |    7 +++----
 hw/rc4030.c    |   17 -----------------
 hw/rc4030.h    |    4 ----
 3 files changed, 3 insertions(+), 25 deletions(-)

Patch

diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
index b4c95c9..04d80ee 100644
--- a/hw/mips_jazz.c
+++ b/hw/mips_jazz.c
@@ -104,9 +104,7 @@  void mips_jazz_init (ram_addr_t ram_size,
     int bios_size, n;
     BusState *cpu;
     DeviceState *dev;
-    qemu_irq *rc4030, *i8259;
-    rc4030_dma *dmas;
-    void* rc4030_opaque;
+    qemu_irq *i8259;
     int s_dma_dummy;
     NICInfo *nd;
     PITState *pit;
@@ -158,7 +156,8 @@  void mips_jazz_init (ram_addr_t ram_size,
     }
 
     /* Chipset */
-    rc4030_opaque = rc4030_init(cpu, &rc4030, &dmas);
+    dev = qdev_create(cpu, "rc4030");
+    qdev_init_nofail(dev);
     s_dma_dummy = cpu_register_io_memory(dma_dummy_read, dma_dummy_write, NULL);
     cpu_register_physical_memory(0x8000d000, 0x00001000, s_dma_dummy);
 
diff --git a/hw/rc4030.c b/hw/rc4030.c
index 3c8cdfa..710085e 100644
--- a/hw/rc4030.c
+++ b/hw/rc4030.c
@@ -948,20 +948,3 @@  static void rc4030_register_devices(void)
 
 device_init(rc4030_register_devices)
 
-void *rc4030_init(BusState *bus,
-                  qemu_irq **irqs, rc4030_dma **dmas)
-{
-    DeviceState *dev;
-    rc4030State* rc4030;
-
-    dev = qdev_create(bus, "rc4030");
-    qdev_init_nofail(dev);
-
-    rc4030 = DO_UPCAST(rc4030State, busdev, dev);
-
-    *irqs = rc4030->busdev.gpio_in;
-    *dmas = rc4030->bus.dmas;
-
-    return rc4030;
-}
-
diff --git a/hw/rc4030.h b/hw/rc4030.h
index 58522f3..f15b459 100644
--- a/hw/rc4030.h
+++ b/hw/rc4030.h
@@ -34,8 +34,4 @@  void rc4030_dma_write(void *dma, uint8_t *buf, int len);
 void *rc4030_get_opaque(void);
 rc4030_dma rc4030_get_dma(int dma);
 
-/* Non-qdev compatibility stuff... */
-void *rc4030_init(BusState *parent,
-                  qemu_irq **irqs, rc4030_dma **dmas);
-
 #endif