aboutsummaryrefslogtreecommitdiffstats
path: root/hw/pcnet-pci.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-04-04 18:28:05 +0300
committerMichael S. Tsirkin <mst@redhat.com>2011-04-07 13:56:46 +0300
commit27a4154324b9de74b8621c83980fd82ac80f3b8f (patch)
tree4289ae1aa6ae4ad8477e55bde97621f47e6c708b /hw/pcnet-pci.c
parent667bb59d2358daeef179583c944becba3f1f9680 (diff)
pcnet-pci: convert to pci_register_bar_simple()
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pcnet-pci.c')
-rw-r--r--hw/pcnet-pci.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index 339a40196..4ac3e3297 100644
--- a/hw/pcnet-pci.c
+++ b/hw/pcnet-pci.c
@@ -214,19 +214,6 @@ static CPUReadMemoryFunc * const pcnet_mmio_read[] = {
&pcnet_mmio_readl
};
-static void pcnet_mmio_map(PCIDevice *pci_dev, int region_num,
- pcibus_t addr, pcibus_t size, int type)
-{
- PCIPCNetState *d = DO_UPCAST(PCIPCNetState, pci_dev, pci_dev);
-
-#ifdef PCNET_DEBUG_IO
- printf("pcnet_mmio_map addr=0x%08"FMT_PCIBUS" 0x%08"FMT_PCIBUS"\n",
- addr, size);
-#endif
-
- cpu_register_physical_memory(addr, PCNET_PNPMMIO_SIZE, d->state.mmio_index);
-}
-
static void pci_physical_memory_write(void *dma_opaque, target_phys_addr_t addr,
uint8_t *buf, int len, int do_bswap)
{
@@ -300,8 +287,7 @@ static int pci_pcnet_init(PCIDevice *pci_dev)
pci_register_bar(pci_dev, 0, PCNET_IOPORT_SIZE,
PCI_BASE_ADDRESS_SPACE_IO, pcnet_ioport_map);
- pci_register_bar(pci_dev, 1, PCNET_PNPMMIO_SIZE,
- PCI_BASE_ADDRESS_SPACE_MEMORY, pcnet_mmio_map);
+ pci_register_bar_simple(pci_dev, 1, PCNET_PNPMMIO_SIZE, 0, s->mmio_index);
s->irq = pci_dev->irq[0];
s->phys_mem_read = pci_physical_memory_read;