diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index d2b14f7b4fc68386c277b467a31deec58a75f9b1..73d47b845b6b73ed771f1fab8bcd2042fca68f50 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -1713,13 +1713,6 @@ typedef struct { OHCIState state; } OHCIPCIState; -static void ohci_mapfunc(PCIDevice *pci_dev, int i, - pcibus_t addr, pcibus_t size, int type) -{ - OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, pci_dev); - cpu_register_physical_memory(addr, size, ohci->state.mem); -} - static int usb_ohci_initfn_pci(struct PCIDevice *dev) { OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, dev); @@ -1737,8 +1730,7 @@ static int usb_ohci_initfn_pci(struct PCIDevice *dev) ohci->state.irq = ohci->pci_dev.irq[0]; /* TODO: avoid cast below by using dev */ - pci_register_bar(&ohci->pci_dev, 0, 256, - PCI_BASE_ADDRESS_SPACE_MEMORY, ohci_mapfunc); + pci_register_bar_simple(&ohci->pci_dev, 0, 256, 0, ohci->state.mem); return 0; }