summary refs log tree commit diff stats
path: root/hw/ppc4xx_pci.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-25 07:48:24 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-25 07:48:24 -0500
commit8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d (patch)
treefe43017f2bf431bc55a90b28e6c0e9357c4d46bd /hw/ppc4xx_pci.c
parent444dc48298c480e42e15a8fe676be737d8a6b2a1 (diff)
parent2b90ca040c59d73943061e49f39455964e8af158 (diff)
downloadfocaccia-qemu-8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d.tar.gz
focaccia-qemu-8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d.zip
Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging
Diffstat (limited to 'hw/ppc4xx_pci.c')
-rw-r--r--hw/ppc4xx_pci.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/ppc4xx_pci.c b/hw/ppc4xx_pci.c
index 52e2663a01..339b38ec7a 100644
--- a/hw/ppc4xx_pci.c
+++ b/hw/ppc4xx_pci.c
@@ -368,10 +368,12 @@ PCIBus *ppc4xx_pci_init(CPUState *env, qemu_irq pci_irqs[4],
     cpu_register_physical_memory(config_space + PCIC0_CFGADDR, 4, index);
 
     /* CFGDATA */
-    index = pci_host_data_register_mmio(&controller->pci_state, 1);
-    if (index < 0)
-        goto free;
-    cpu_register_physical_memory(config_space + PCIC0_CFGDATA, 4, index);
+    memory_region_init_io(&controller->pci_state.data_mem,
+                          &pci_host_data_be_ops,
+                          &controller->pci_state, "pci-conf-data", 4);
+    memory_region_add_subregion(get_system_memory(),
+                                config_space + PCIC0_CFGDATA,
+                                &controller->pci_state.data_mem);
 
     /* Internal registers */
     index = cpu_register_io_memory(pci_reg_read, pci_reg_write, controller,