diff options
author | Anthony Liguori | 2011-12-12 21:29:38 +0100 |
---|---|---|
committer | Anthony Liguori | 2011-12-15 16:20:49 +0100 |
commit | d0c5be58704640850fad02c0ff38135f2e9aa589 (patch) | |
tree | 6b77a63d82cc9e56b4d0160334eeea3dca444818 /hw/pc_piix.c | |
parent | dev: add an anonymous peripheral container (diff) | |
download | qemu-d0c5be58704640850fad02c0ff38135f2e9aa589.tar.gz qemu-d0c5be58704640850fad02c0ff38135f2e9aa589.tar.xz qemu-d0c5be58704640850fad02c0ff38135f2e9aa589.zip |
rtc: make piix3 set the rtc as a child (v2)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pc_piix.c')
-rw-r--r-- | hw/pc_piix.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 970f43c99c..2d5ea2c5ad 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -205,6 +205,17 @@ static void pc_init1(MemoryRegion *system_memory, } } + /* FIXME there's some major spaghetti here. Somehow we create the devices + * on the PIIX before we actually create it. We create the PIIX3 deep in + * the recess of the i440fx creation too and then lose the DeviceState. + * + * For now, let's "fix" this by making judicious use of paths. This is not + * generally the right way to do this. + */ + + qdev_property_add_child(qdev_resolve_path("/i440fx/piix3", NULL), + "rtc", (DeviceState *)rtc_state, NULL); + audio_init(gsi, pci_enabled ? pci_bus : NULL); pc_cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device, |