/* pcifinddevice.c * * Copyright 2001, Till Straumann * * find a particular PCI device * (we assume, the firmware configured the PCI bus[es] for us) * * * Kate Feng , modified it to support * the mvme5500 board and provided glues to Till's vmeUniverse.c. * */ #define PCI_INVALID_VENDORDEVICEID 0xffffffff #define PCI_MULTI_FUNCTION 0x80 /*#define PCI_DEBUG*/ #include #include int BSP_PCIxFindDevice(unsigned short vendorid, unsigned short deviceid, int instance, int pciNum, int *pbus, int *pdev, int *pfun ) { unsigned int d; unsigned short s; unsigned char bus,dev,fun,hd; for (bus=0; bus<2; bus++) { for (dev=0; dev