diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-03-14 21:42:08 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-03-14 21:42:08 +0000 |
commit | c2701a0c63a93c2c5190238ae35563d254f229f9 (patch) | |
tree | 98ebad7106a67973ef294a53a8ca6d0b7f9ef09e /c/src/lib/libbsp/i386/shared | |
parent | 2005-03-14 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-c2701a0c63a93c2c5190238ae35563d254f229f9.tar.bz2 |
2005-03-14 Joel Sherrill <joel@OARcorp.com>
* pci/pcibios.c, pci/pcibios.h: Continue PCI API unification. All use
pci_find_device().
Diffstat (limited to 'c/src/lib/libbsp/i386/shared')
-rw-r--r-- | c/src/lib/libbsp/i386/shared/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/shared/pci/pcibios.c | 21 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/shared/pci/pcibios.h | 1 |
3 files changed, 26 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/i386/shared/ChangeLog b/c/src/lib/libbsp/i386/shared/ChangeLog index ae3fa0de0c..96c1b70eaf 100644 --- a/c/src/lib/libbsp/i386/shared/ChangeLog +++ b/c/src/lib/libbsp/i386/shared/ChangeLog @@ -1,3 +1,8 @@ +2005-03-14 Joel Sherrill <joel@OARcorp.com> + + * pci/pcibios.c, pci/pcibios.h: Continue PCI API unification. All use + pci_find_device(). + 2005-01-04 Joel Sherrill <joel@OARcorp.com> * comm/gdb_glue.c, irq/idt.c: Remove warnings. diff --git a/c/src/lib/libbsp/i386/shared/pci/pcibios.c b/c/src/lib/libbsp/i386/shared/pci/pcibios.c index 6041cd6af1..6423ead089 100644 --- a/c/src/lib/libbsp/i386/shared/pci/pcibios.c +++ b/c/src/lib/libbsp/i386/shared/pci/pcibios.c @@ -173,6 +173,27 @@ pcib_find_by_devid(int vendorId, int devId, int idx, int *sig) return pcib_convert_err((pcibExchg[0] >> 8) & 0xff); } +int +pci_find_device( + unsigned short vendorid, + unsigned short deviceid, + int instance, + int *pbus, + int *pdev, + int *pfun +) +{ + int status; + int sig; + + status = pcib_find_by_devid( vendorid, deviceid, instance, &sig ); + + *pbus = PCIB_DEVSIG_BUS(sig); + *pdev = PCIB_DEVSIG_DEV(sig); + *pfun = PCIB_DEVSIG_FUNC(sig); + return status; +} + /* * Find specified class code return device signature: combination * of bus number, device number and function number diff --git a/c/src/lib/libbsp/i386/shared/pci/pcibios.h b/c/src/lib/libbsp/i386/shared/pci/pcibios.h index efaac74347..f12a12d8b3 100644 --- a/c/src/lib/libbsp/i386/shared/pci/pcibios.h +++ b/c/src/lib/libbsp/i386/shared/pci/pcibios.h @@ -27,7 +27,6 @@ extern "C" { #endif -int pcib_find_by_devid(int vendorId, int devId, int idx, int *sig); int pcib_find_by_class(int classCode, int idx, int *sig); int pcib_special_cycle(int busNo, int data); int pcib_conf_read8(int sig, int off, unsigned char *data); |