mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 20:10:18 +03:00
Updated all common buses to new API.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user