* [Qemu-devel] [PATCH 13/15] usb-ohci: convert to pci_bar_map
@ 2010-07-12 18:42 Blue Swirl
0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2010-07-12 18:42 UTC (permalink / raw)
To: qemu-devel, Anthony Liguori, Michael S. Tsirkin
Use pci_bar_map() instead of a mapping function.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
hw/usb-ohci.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index c60fd8d..992400e 100644
--- a/hw/usb-ohci.c
+++ b/hw/usb-ohci.c
@@ -1717,13 +1717,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);
@@ -1742,7 +1735,8 @@ static int usb_ohci_initfn_pci(struct PCIDevice *dev)
/* TODO: avoid cast below by using dev */
pci_register_bar((struct PCIDevice *)ohci, 0, 256,
- PCI_BASE_ADDRESS_SPACE_MEMORY, ohci_mapfunc);
+ PCI_BASE_ADDRESS_SPACE_MEMORY, NULL);
+ pci_bar_map((struct PCIDevice *)ohci, 0, 0, 256, 0, ohci->state.mem);
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-12 18:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-12 18:42 [Qemu-devel] [PATCH 13/15] usb-ohci: convert to pci_bar_map Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).