summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen/xenpci/xenpci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/xen/xenpci/xenpci.c')
-rw-r--r--sys/dev/xen/xenpci/xenpci.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/sys/dev/xen/xenpci/xenpci.c b/sys/dev/xen/xenpci/xenpci.c
index e334051..3fdd78c 100644
--- a/sys/dev/xen/xenpci/xenpci.c
+++ b/sys/dev/xen/xenpci/xenpci.c
@@ -108,13 +108,6 @@ xenpci_deallocate_resources(device_t dev)
scp->rid_irq, scp->res_irq);
scp->res_irq = 0;
}
- if (scp->res_memory != 0) {
- bus_deactivate_resource(dev, SYS_RES_MEMORY,
- scp->rid_memory, scp->res_memory);
- bus_release_resource(dev, SYS_RES_MEMORY,
- scp->rid_memory, scp->res_memory);
- scp->res_memory = 0;
- }
return (0);
}
@@ -134,16 +127,6 @@ xenpci_allocate_resources(device_t dev)
goto errexit;
}
- scp->rid_memory = PCIR_BAR(1);
- scp->res_memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
- &scp->rid_memory, RF_ACTIVE);
- if (scp->res_memory == NULL) {
- printf("xenpci Could not allocate memory bar.\n");
- goto errexit;
- }
-
- scp->phys_next = rman_get_start(scp->res_memory);
-
return (0);
errexit:
@@ -153,40 +136,6 @@ errexit:
}
/*
- * Allocate a physical address range from our mmio region.
- */
-static int
-xenpci_alloc_space_int(struct xenpci_softc *scp, size_t sz,
- vm_paddr_t *pa)
-{
-
- if (scp->phys_next + sz > rman_get_end(scp->res_memory)) {
- return (ENOMEM);
- }
-
- *pa = scp->phys_next;
- scp->phys_next += sz;
-
- return (0);
-}
-
-/*
- * Allocate a physical address range from our mmio region.
- */
-int
-xenpci_alloc_space(size_t sz, vm_paddr_t *pa)
-{
- device_t dev = devclass_get_device(xenpci_devclass, 0);
-
- if (dev) {
- return (xenpci_alloc_space_int(device_get_softc(dev),
- sz, pa));
- } else {
- return (ENOMEM);
- }
-}
-
-/*
* Probe - just check device ID.
*/
static int
OpenPOWER on IntegriCloud