diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-05-16 16:04:10 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-05-16 16:11:44 -0500 |
commit | 8bbf69e6e66aeee9add5b78d43c954e087b6a7f0 (patch) | |
tree | 7666e597a8d72982a77ae46ffb71017e255feac4 /c/src/lib/libbsp/sparc/shared/pci | |
parent | mvme5500 and cpukit pci.h - Eliminate mvme5500 specific pci.h (diff) | |
download | rtems-8bbf69e6e66aeee9add5b78d43c954e087b6a7f0.tar.bz2 |
pci.h cleanup - Consolidate common defines to cpukit pci.h
+ libbsp/sparc/shared/include/pci.h was largely a copy of
an older version of the cpukit pci.h. Removed much of the
contents and included <rtems/pci.h>.
+ sparc/*/pci*.c - Move to <rtems/pci.h> required updating
to use uint32_t for dword accesses.
+ Rename PCI_MULTI_FUNCTION to PCI_HEADER_TYPE_MULTI_FUNCTION
+ Define PCI_HEADER_TYPE_MULTI_FUNCTION in cpukit pci.h and remove
PCI_MULTI_FUNCTION definitions in C files.
+ Move PCI_INVALID_VENDORDEVICEID definitions from various C files
to cpukit pci.h
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared/pci')
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/pci/pcifinddevice.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/pci/pcifinddevice.c b/c/src/lib/libbsp/sparc/shared/pci/pcifinddevice.c index a5c1cc9e61..bd05aab063 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/pcifinddevice.c +++ b/c/src/lib/libbsp/sparc/shared/pci/pcifinddevice.c @@ -2,13 +2,8 @@ /* find a particular PCI device * (we assume, the firmware configured the PCI bus[es] for us) - * - * pcifinddevice.c,v 1.1.4.2 2003/07/18 15:48:54 joel Exp */ -#define PCI_INVALID_VENDORDEVICEID 0xffffffff -#define PCI_MULTI_FUNCTION 0x80 - #include <pci.h> #include <rtems/bspIo.h> @@ -16,7 +11,7 @@ int BSP_pciFindDevice( unsigned short vendorid, unsigned short deviceid, int instance, int *pbus, int *pdev, int *pfun ) { - unsigned int d; + uint32_t d; unsigned short s; unsigned char bus,dev,fun,hd; @@ -24,7 +19,7 @@ BSP_pciFindDevice( unsigned short vendorid, unsigned short deviceid, for (dev=0; dev<PCI_MAX_DEVICES; dev++) { pci_read_config_byte(bus,dev,0, PCI_HEADER_TYPE, &hd); - hd = (hd & PCI_MULTI_FUNCTION ? PCI_MAX_FUNCTIONS : 1); + hd = (hd & PCI_HEADER_TYPE_MULTI_FUNCTION ? PCI_MAX_FUNCTIONS : 1); for (fun=0; fun<hd; fun++) { /* |