2005-04-13 02:59:13 +00:00
|
|
|
/*
|
|
|
|
* MCA bus driver code
|
|
|
|
*
|
|
|
|
* Abstracted from 3c509.c.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_H
|
|
|
|
#define MCA_H
|
|
|
|
|
2005-04-14 14:26:28 +00:00
|
|
|
#include "isa_ids.h"
|
2005-04-22 02:47:39 +00:00
|
|
|
#include "nic.h"
|
2005-04-14 14:26:28 +00:00
|
|
|
|
2005-04-21 18:18:29 +00:00
|
|
|
#define MCA_BUS_TYPE 3
|
|
|
|
|
2005-04-13 02:59:13 +00:00
|
|
|
/*
|
|
|
|
* MCA constants
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define MCA_MOTHERBOARD_SETUP_REG 0x94
|
|
|
|
#define MCA_ADAPTER_SETUP_REG 0x96
|
2005-04-22 02:28:16 +00:00
|
|
|
#define MCA_MAX_SLOT_NR 0x07 /* Must be 2^n - 1 */
|
2005-04-13 02:59:13 +00:00
|
|
|
#define MCA_POS_REG(n) (0x100+(n))
|
|
|
|
|
|
|
|
/* Is there a standard that would define this? */
|
2005-04-13 12:01:44 +00:00
|
|
|
#define GENERIC_MCA_VENDOR ISA_VENDOR ( 'M', 'C', 'A' )
|
2005-04-13 02:59:13 +00:00
|
|
|
|
2005-04-22 02:28:16 +00:00
|
|
|
/*
|
|
|
|
* A location on an MCA bus
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct mca_loc {
|
|
|
|
unsigned int slot;
|
|
|
|
};
|
|
|
|
|
2005-04-13 02:59:13 +00:00
|
|
|
/*
|
|
|
|
* A physical MCA device
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct mca_device {
|
2005-04-14 13:44:07 +00:00
|
|
|
const char *name;
|
2005-04-13 02:59:13 +00:00
|
|
|
unsigned int slot;
|
|
|
|
unsigned char pos[8];
|
|
|
|
};
|
|
|
|
#define MCA_ID(mca) ( ( (mca)->pos[1] << 8 ) + (mca)->pos[0] )
|
|
|
|
|
|
|
|
/*
|
|
|
|
* An individual MCA device identified by ID
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct mca_id {
|
|
|
|
const char *name;
|
|
|
|
int id;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* An MCA driver, with a device ID (struct mca_id) table.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct mca_driver {
|
|
|
|
struct mca_id *ids;
|
|
|
|
unsigned int id_count;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Define an MCA driver
|
|
|
|
*
|
|
|
|
*/
|
2005-04-22 02:28:16 +00:00
|
|
|
#define MCA_DRIVER( _ids ) { \
|
|
|
|
.ids = _ids, \
|
|
|
|
.id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \
|
2005-04-13 02:59:13 +00:00
|
|
|
}
|
|
|
|
|
2005-04-22 02:47:39 +00:00
|
|
|
/*
|
|
|
|
* Functions in mca.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern void fill_mca_nic ( struct nic *nic, struct mca_device *mca );
|
|
|
|
|
2005-04-13 02:59:13 +00:00
|
|
|
/*
|
2005-04-22 02:28:16 +00:00
|
|
|
* MCA bus global definition
|
2005-04-13 02:59:13 +00:00
|
|
|
*
|
|
|
|
*/
|
2005-04-22 02:28:16 +00:00
|
|
|
extern struct bus_driver mca_driver;
|
2005-04-13 02:59:13 +00:00
|
|
|
|
|
|
|
#endif
|