diff options
author | Avi Kivity <avi@redhat.com> | 2011-07-24 17:47:18 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-09-04 17:46:50 +0300 |
commit | d0ed8076cbdc26138a7e33fed5e45a35d019a103 (patch) | |
tree | 5d63c2c4796d4ba51e7f4c2f8b44f22f9c19904f /hw/ppc4xx_pci.c | |
parent | 2b985d9c29efdd0a8394ad6b2edd2ba1acdb3536 (diff) | |
download | qemu-d0ed8076cbdc26138a7e33fed5e45a35d019a103.zip qemu-d0ed8076cbdc26138a7e33fed5e45a35d019a103.tar.gz qemu-d0ed8076cbdc26138a7e33fed5e45a35d019a103.tar.bz2 |
pci_host: convert conf index and data ports to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/ppc4xx_pci.c')
-rw-r--r-- | hw/ppc4xx_pci.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/ppc4xx_pci.c b/hw/ppc4xx_pci.c index 52e2663..339b38e 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, |