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/dec_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/dec_pci.c')
-rw-r--r-- | hw/dec_pci.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/hw/dec_pci.c b/hw/dec_pci.c index a35f382052..1aec06611c 100644 --- a/hw/dec_pci.c +++ b/hw/dec_pci.c @@ -80,16 +80,15 @@ PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int devfn) static int pci_dec_21154_init_device(SysBusDevice *dev) { DECState *s; - int pci_mem_config, pci_mem_data; s = FROM_SYSBUS(DECState, dev); - pci_mem_config = pci_host_conf_register_mmio(&s->host_state, - DEVICE_LITTLE_ENDIAN); - pci_mem_data = pci_host_data_register_mmio(&s->host_state, - DEVICE_LITTLE_ENDIAN); - sysbus_init_mmio(dev, 0x1000, pci_mem_config); - sysbus_init_mmio(dev, 0x1000, pci_mem_data); + memory_region_init_io(&s->host_state.conf_mem, &pci_host_conf_le_ops, + &s->host_state, "pci-conf-idx", 0x1000); + memory_region_init_io(&s->host_state.data_mem, &pci_host_data_le_ops, + &s->host_state, "pci-data-idx", 0x1000); + sysbus_init_mmio_region(dev, &s->host_state.conf_mem); + sysbus_init_mmio_region(dev, &s->host_state.data_mem); return 0; } |