diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-23 23:04:00 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-01-25 22:02:54 +0100 |
commit | 95ed3b7cf1677dc9f995a6e1fcc7bf377cf94a0e (patch) | |
tree | 6bd33b1eceaa32b1559d7502028aab68d3f3e226 /hw/ppc/mac_newworld.c | |
parent | d8c6d07fdff2523ca78f95c7d8a7fe90ee7ea5a7 (diff) | |
download | hqemu-95ed3b7cf1677dc9f995a6e1fcc7bf377cf94a0e.zip hqemu-95ed3b7cf1677dc9f995a6e1fcc7bf377cf94a0e.tar.gz |
mac_nvram: QOM'ify MacIO NVRAM
It was not qdev'ified before. Turn it into a SysBusDevice and
initialize it via static properties.
Prepare Old World specific MacIO state and embed the NVRAM state there.
Drop macio_nvram_setup_bar() in favor of sysbus_mmio_map() or
direct use of Memory API.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/mac_newworld.c')
-rw-r--r-- | hw/ppc/mac_newworld.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index a62a6e9..a4b38fb 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -377,7 +377,7 @@ static void ppc_core99_init(QEMUMachineInitArgs *args) macio = pci_create(pci_bus, -1, TYPE_NEWWORLD_MACIO); macio_init(macio, pic_mem, - dbdma_mem, cuda_mem, NULL, 3, ide_mem, escc_bar); + dbdma_mem, cuda_mem, 3, ide_mem, escc_bar); if (usb_enabled(machine_arch == ARCH_MAC99_U3)) { pci_create_simple(pci_bus, -1, "pci-ohci"); @@ -393,9 +393,13 @@ static void ppc_core99_init(QEMUMachineInitArgs *args) graphic_depth = 15; /* The NewWorld NVRAM is not located in the MacIO device */ - nvr = macio_nvram_init(0x2000, 1); + dev = qdev_create(NULL, TYPE_MACIO_NVRAM); + qdev_prop_set_uint32(dev, "size", 0x2000); + qdev_prop_set_uint32(dev, "it_shift", 1); + qdev_init_nofail(dev); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0xFFF04000); + nvr = MACIO_NVRAM(dev); pmac_format_nvram_partition(nvr, 0x2000); - macio_nvram_setup_bar(nvr, get_system_memory(), 0xFFF04000); /* No PCI init: the BIOS will do it */ fw_cfg = fw_cfg_init(0, 0, CFG_ADDR, CFG_ADDR + 2); |