diff options
author | Andreas Färber <afaerber@suse.de> | 2013-02-01 00:13:41 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2013-02-01 00:13:41 +0100 |
commit | 6b2578d678497dbce44ed7999d269fc973ae6e8f (patch) | |
tree | a3a036444eb8c52c19c7a37b9f4e958eea446be6 /hw/r2d.c | |
parent | e62a214cd49f836339fe3fd8126fc81d66c3c917 (diff) |
ide/mmio: QOM'ify MMIO IDE for R2D
It was not qdev'ified before, so turn it into a SysBusDevice.
Keep mmio_ide_init_drives() around to attach the hard drive.
Signed-off-by: Andreas Färberr <afaerber@suse.de>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/r2d.c')
-rw-r--r-- | hw/r2d.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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); |