aboutsummaryrefslogtreecommitdiff
path: root/hw/r2d.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/r2d.c')
-rw-r--r--hw/r2d.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/r2d.c b/hw/r2d.c
index a2e3b6fe1c..2d0dd1ffba 100644
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -276,8 +276,14 @@ static void r2d_init(QEMUMachineInitArgs *args)
/* onboard CF (True IDE mode, Master only). */
dinfo = drive_get(IF_IDE, 0, 0);
- mmio_ide_init(0x14001000, 0x1400080c, address_space_mem, irq[CF_IDE], 1,
- dinfo, NULL);
+ dev = qdev_create(NULL, "mmio-ide");
+ busdev = SYS_BUS_DEVICE(dev);
+ sysbus_connect_irq(busdev, 0, irq[CF_IDE]);
+ qdev_prop_set_uint32(dev, "shift", 1);
+ qdev_init_nofail(dev);
+ sysbus_mmio_map(busdev, 0, 0x14001000);
+ sysbus_mmio_map(busdev, 1, 0x1400080c);
+ mmio_ide_init_drives(dev, dinfo, NULL);
/* onboard flash memory */
dinfo = drive_get(IF_PFLASH, 0, 0);