aboutsummaryrefslogtreecommitdiff
path: root/hw/piix_pci.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-07-24 17:47:18 +0300
committerAvi Kivity <avi@redhat.com>2011-09-04 17:46:50 +0300
commitd0ed8076cbdc26138a7e33fed5e45a35d019a103 (patch)
tree5d63c2c4796d4ba51e7f4c2f8b44f22f9c19904f /hw/piix_pci.c
parent2b985d9c29efdd0a8394ad6b2edd2ba1acdb3536 (diff)
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/piix_pci.c')
-rw-r--r--hw/piix_pci.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index c563c6e1a3..f892994eae 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -235,9 +235,16 @@ static int i440fx_pcihost_initfn(SysBusDevice *dev)
{
I440FXState *s = FROM_SYSBUS(I440FXState, dev);
- pci_host_conf_register_ioport(0xcf8, s);
+ memory_region_init_io(&s->conf_mem, &pci_host_conf_le_ops, s,
+ "pci-conf-idx", 4);
+ sysbus_add_io(dev, 0xcf8, &s->conf_mem);
+ sysbus_init_ioports(&s->busdev, 0xcf8, 4);
+
+ memory_region_init_io(&s->data_mem, &pci_host_data_le_ops, s,
+ "pci-conf-data", 4);
+ sysbus_add_io(dev, 0xcfc, &s->data_mem);
+ sysbus_init_ioports(&s->busdev, 0xcfc, 4);
- pci_host_data_register_ioport(0xcfc, s);
return 0;
}