4
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
7
#include <ipxe/isa_ids.h>
8
#include <ipxe/device.h>
9
#include <ipxe/tables.h>
16
#define EISA_MIN_SLOT (0x1)
17
#define EISA_MAX_SLOT (0xf) /* Must be 2^n - 1 */
18
#define EISA_SLOT_BASE( n ) ( 0x1000 * (n) )
20
#define EISA_VENDOR_ID ( 0xc80 )
21
#define EISA_PROD_ID ( 0xc82 )
22
#define EISA_GLOBAL_CONFIG ( 0xc84 )
24
#define EISA_CMD_RESET ( 1 << 2 )
25
#define EISA_CMD_ENABLE ( 1 << 0 )
27
/** An EISA device ID list entry */
28
struct eisa_device_id {
31
/** Manufacturer ID */
45
/** Manufacturer ID */
49
/** Driver for this device */
50
struct eisa_driver *driver;
51
/** Driver-private data
53
* Use eisa_set_drvdata() and eisa_get_drvdata() to access
62
struct eisa_device_id *ids;
63
/** Number of entries in EISA ID table */
64
unsigned int id_count;
69
* @v id Matching entry in ID table
70
* @ret rc Return status code
72
int ( * probe ) ( struct eisa_device *eisa,
73
const struct eisa_device_id *id );
79
void ( * remove ) ( struct eisa_device *eisa );
82
/** EISA driver table */
83
#define EISA_DRIVERS __table ( struct eisa_driver, "eisa_drivers" )
85
/** Declare an EISA driver */
86
#define __eisa_driver __table_entry ( EISA_DRIVERS, 01 )
88
extern void eisa_device_enabled ( struct eisa_device *eisa, int enabled );
95
static inline void enable_eisa_device ( struct eisa_device *eisa ) {
96
eisa_device_enabled ( eisa, 1 );
100
* Disable EISA device
102
* @v eisa EISA device
104
static inline void disable_eisa_device ( struct eisa_device *eisa ) {
105
eisa_device_enabled ( eisa, 0 );
109
* Set EISA driver-private data
111
* @v eisa EISA device
112
* @v priv Private data
114
static inline void eisa_set_drvdata ( struct eisa_device *eisa, void *priv ) {
119
* Get EISA driver-private data
121
* @v eisa EISA device
122
* @ret priv Private data
124
static inline void * eisa_get_drvdata ( struct eisa_device *eisa ) {