summaryrefslogtreecommitdiffstats
path: root/src/include/mca.h
diff options
context:
space:
mode:
authorMichael Brown2005-04-22 04:28:16 +0200
committerMichael Brown2005-04-22 04:28:16 +0200
commit924143661a79588cc6dccea7791dbfb6741b5062 (patch)
treebe153a809157271972021741ae423efdef631881 /src/include/mca.h
parentRevert debug message prefix back to none, since we sometimes want to use (diff)
downloadipxe-924143661a79588cc6dccea7791dbfb6741b5062.tar.gz
ipxe-924143661a79588cc6dccea7791dbfb6741b5062.tar.xz
ipxe-924143661a79588cc6dccea7791dbfb6741b5062.zip
Updated all common buses to new API.
Diffstat (limited to 'src/include/mca.h')
-rw-r--r--src/include/mca.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/include/mca.h b/src/include/mca.h
index 3b4de21f..236c9002 100644
--- a/src/include/mca.h
+++ b/src/include/mca.h
@@ -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