Tweak API to allow separation of bus-scanning and device-probing logic.

This commit is contained in:
Michael Brown
2005-04-14 13:44:07 +00:00
parent ce8dea0dff
commit 104880ca19
6 changed files with 89 additions and 94 deletions

View File

@@ -25,10 +25,9 @@
* A physical EISA device
*
*/
struct dev;
struct eisa_device {
char *magic; /* must be first */
struct dev *dev;
const char *name;
unsigned int slot;
uint16_t ioaddr;
uint16_t mfg_id;
@@ -69,9 +68,10 @@ struct eisa_driver {
* Functions in eisa.c
*
*/
extern struct eisa_device * eisa_device ( struct dev *dev );
extern int find_eisa_device ( struct eisa_device *eisa,
struct eisa_driver *driver );
extern int find_eisa_boot_device ( struct dev *dev,
struct eisa_driver *driver );
extern void enable_eisa_device ( struct eisa_device *eisa );
#endif /* EISA_H */

View File

@@ -26,10 +26,9 @@
* A physical MCA device
*
*/
struct dev;
struct mca_device {
char *magic; /* must be first */
struct dev *dev;
const char *name;
unsigned int slot;
unsigned char pos[8];
int already_tried;
@@ -69,8 +68,8 @@ struct mca_driver {
* Functions in mca.c
*
*/
extern struct mca_device * mca_device ( struct dev *dev );
extern int find_mca_device ( struct mca_device *mca,
struct mca_driver *driver );
extern int find_mca_boot_device ( struct dev *dev, struct mca_driver *driver );
#endif

View File

@@ -236,10 +236,9 @@
* A physical PCI device
*
*/
struct dev;
struct pci_device {
char * magic; /* must be first */
struct dev * dev;
const char * name;
uint32_t membase; /* BAR 1 */
uint32_t ioaddr; /* first IO BAR */
uint16_t vendor, dev_id;
@@ -322,9 +321,9 @@ extern unsigned long pci_bus_base ( struct pci_device *dev );
* Functions in pci.c
*
*/
extern struct pci_device * pci_device ( struct dev *dev );
extern int find_pci_device ( struct pci_device *pci,
struct pci_driver *driver );
extern int find_pci_boot_device ( struct dev *dev, struct pci_driver *driver );
extern void adjust_pci_device ( struct pci_device *pci );
extern unsigned long pci_bar_start ( struct pci_device *pci,
unsigned int bar );