diff options
author | Avi Kivity <avi@redhat.com> | 2011-07-24 17:47:18 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-08-24 20:17:39 +0300 |
commit | d2c33733c85c4df7cd0f5e0426a22e737d542516 (patch) | |
tree | daa4228405f900b9189b946225b61e7346bb74a3 /hw/piix_pci.c | |
parent | be35694da941168603b09a7420bcc476d745fc41 (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.c | 11 |
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; } |