mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-07 11:28:46 +00:00
usb-ohci: convert to pci_register_bar_simple()
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
27a4154324
commit
6e964ded1e
@ -1713,13 +1713,6 @@ typedef struct {
|
|||||||
OHCIState state;
|
OHCIState state;
|
||||||
} OHCIPCIState;
|
} 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)
|
static int usb_ohci_initfn_pci(struct PCIDevice *dev)
|
||||||
{
|
{
|
||||||
OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, 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];
|
ohci->state.irq = ohci->pci_dev.irq[0];
|
||||||
|
|
||||||
/* TODO: avoid cast below by using dev */
|
/* TODO: avoid cast below by using dev */
|
||||||
pci_register_bar(&ohci->pci_dev, 0, 256,
|
pci_register_bar_simple(&ohci->pci_dev, 0, 256, 0, ohci->state.mem);
|
||||||
PCI_BASE_ADDRESS_SPACE_MEMORY, ohci_mapfunc);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user