aboutsummaryrefslogtreecommitdiffstats
path: root/xen/drivers/pci
diff options
context:
space:
mode:
authoriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>2005-02-08 15:45:45 +0000
committeriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>2005-02-08 15:45:45 +0000
commitca8a0a94f24230f3d84e45c4b2ee82682e37f5d8 (patch)
tree749e72ee53193bca43e2303ffbc559acc28e2f3b /xen/drivers/pci
parentf337575998717a3140873ad92da3828b8a4d1de4 (diff)
parent055935cf6d7925378728bea9a68aa4e58807db4d (diff)
downloadxen-ca8a0a94f24230f3d84e45c4b2ee82682e37f5d8.tar.gz
xen-ca8a0a94f24230f3d84e45c4b2ee82682e37f5d8.tar.bz2
xen-ca8a0a94f24230f3d84e45c4b2ee82682e37f5d8.zip
bitkeeper revision 1.1159.212.131 (4208dea93kRwptTEZzh2Dm2aH9dAKA)
merge
Diffstat (limited to 'xen/drivers/pci')
-rw-r--r--xen/drivers/pci/Makefile2
-rw-r--r--xen/drivers/pci/compat.c65
2 files changed, 1 insertions, 66 deletions
diff --git a/xen/drivers/pci/Makefile b/xen/drivers/pci/Makefile
index 040d5aaccd..f2580105df 100644
--- a/xen/drivers/pci/Makefile
+++ b/xen/drivers/pci/Makefile
@@ -4,7 +4,7 @@
include $(BASEDIR)/Rules.mk
-OBJS := pci.o quirks.o compat.o names.o setup-res.o
+OBJS := pci.o quirks.o names.o setup-res.o
#obj-$(CONFIG_PCI) += pci.o quirks.o compat.o names.o
#obj-$(CONFIG_PROC_FS) += proc.o
diff --git a/xen/drivers/pci/compat.c b/xen/drivers/pci/compat.c
index 61e14b0a84..e69de29bb2 100644
--- a/xen/drivers/pci/compat.c
+++ b/xen/drivers/pci/compat.c
@@ -1,65 +0,0 @@
-/*
- * $Id: compat.c,v 1.1 1998/02/16 10:35:50 mj Exp $
- *
- * PCI Bus Services -- Function For Backward Compatibility
- *
- * Copyright 1998--2000 Martin Mares <mj@ucw.cz>
- */
-
-#include <xen/types.h>
-//#include <xen/kernel.h>
-#include <xen/pci.h>
-
-int
-pcibios_present(void)
-{
- return !list_empty(&pci_devices);
-}
-
-int
-pcibios_find_class(unsigned int class, unsigned short index, unsigned char *bus, unsigned char *devfn)
-{
- const struct pci_dev *dev = NULL;
- int cnt = 0;
-
- while ((dev = pci_find_class(class, dev)))
- if (index == cnt++) {
- *bus = dev->bus->number;
- *devfn = dev->devfn;
- return PCIBIOS_SUCCESSFUL;
- }
- return PCIBIOS_DEVICE_NOT_FOUND;
-}
-
-
-int
-pcibios_find_device(unsigned short vendor, unsigned short device, unsigned short index,
- unsigned char *bus, unsigned char *devfn)
-{
- const struct pci_dev *dev = NULL;
- int cnt = 0;
-
- while ((dev = pci_find_device(vendor, device, dev)))
- if (index == cnt++) {
- *bus = dev->bus->number;
- *devfn = dev->devfn;
- return PCIBIOS_SUCCESSFUL;
- }
- return PCIBIOS_DEVICE_NOT_FOUND;
-}
-
-#define PCI_OP(rw,size,type) \
-int pcibios_##rw##_config_##size (unsigned char bus, unsigned char dev_fn, \
- unsigned char where, unsigned type val) \
-{ \
- struct pci_dev *dev = pci_find_slot(bus, dev_fn); \
- if (!dev) return PCIBIOS_DEVICE_NOT_FOUND; \
- return pci_##rw##_config_##size(dev, where, val); \
-}
-
-PCI_OP(read, byte, char *)
-PCI_OP(read, word, short *)
-PCI_OP(read, dword, int *)
-PCI_OP(write, byte, char)
-PCI_OP(write, word, short)
-PCI_OP(write, dword, int)