Updated all common buses to new API.

This commit is contained in:
Michael Brown
2005-04-22 02:28:16 +00:00
parent 4e3ebba8e6
commit 924143661a
9 changed files with 542 additions and 371 deletions

View File

@@ -20,22 +20,28 @@
#define MCA_MOTHERBOARD_SETUP_REG 0x94
#define MCA_ADAPTER_SETUP_REG 0x96
#define MCA_MAX_SLOT_NR 8
#define MCA_MAX_SLOT_NR 0x07 /* Must be 2^n - 1 */
#define MCA_POS_REG(n) (0x100+(n))
/* Is there a standard that would define this? */
#define GENERIC_MCA_VENDOR ISA_VENDOR ( 'M', 'C', 'A' )
/*
* A location on an MCA bus
*
*/
struct mca_loc {
unsigned int slot;
};
/*
* A physical MCA device
*
*/
struct mca_device {
char *magic; /* must be first */
const char *name;
unsigned int slot;
unsigned char pos[8];
int already_tried;
};
#define MCA_ID(mca) ( ( (mca)->pos[1] << 8 ) + (mca)->pos[0] )
@@ -53,7 +59,6 @@ struct mca_id {
*
*/
struct mca_driver {
const char *name;
struct mca_id *ids;
unsigned int id_count;
};
@@ -62,18 +67,15 @@ struct mca_driver {
* Define an MCA driver
*
*/
#define MCA_DRIVER( driver_name, mca_ids ) { \
.name = driver_name, \
.ids = mca_ids, \
.id_count = sizeof ( mca_ids ) / sizeof ( mca_ids[0] ), \
#define MCA_DRIVER( _ids ) { \
.ids = _ids, \
.id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \
}
/*
* Functions in mca.c
* MCA bus global definition
*
*/
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 );
extern struct bus_driver mca_driver;
#endif