2005-03-08 18:53:11 +00:00
|
|
|
#ifndef ISA_H
|
|
|
|
#define ISA_H
|
|
|
|
|
2005-04-13 12:01:44 +00:00
|
|
|
#include "isa_ids.h"
|
2005-04-14 18:46:43 +00:00
|
|
|
#include "dev.h"
|
2005-03-08 18:53:11 +00:00
|
|
|
|
2005-04-14 18:46:43 +00:00
|
|
|
/*
|
|
|
|
* A physical ISA device
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct isa_device {
|
|
|
|
char *magic; /* must be first */
|
|
|
|
unsigned int probe_idx;
|
|
|
|
uint16_t ioaddr;
|
|
|
|
int already_tried;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* An individual ISA device, identified by probe address
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct isa_probe_addr {
|
|
|
|
uint16_t addr;
|
|
|
|
} __attribute__ (( packed ));
|
2005-03-08 18:53:11 +00:00
|
|
|
|
2005-04-14 18:46:43 +00:00
|
|
|
/*
|
|
|
|
* An ISA driver, with a probe address list and a probe_addr method.
|
|
|
|
* probe_addr() should return 1 if a card is physically present,
|
|
|
|
* leaving the other operations (read MAC address etc.) down to the
|
|
|
|
* main probe() routine.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct isa_driver {
|
2005-03-08 18:53:11 +00:00
|
|
|
const char *name;
|
2005-04-14 18:46:43 +00:00
|
|
|
struct isa_probe_addr *probe_addrs;
|
|
|
|
unsigned int addr_count;
|
|
|
|
int ( * probe_addr ) ( uint16_t addr );
|
|
|
|
uint16_t mfg_id;
|
|
|
|
uint16_t prod_id;
|
2005-03-08 18:53:11 +00:00
|
|
|
};
|
|
|
|
|
2005-04-14 18:46:43 +00:00
|
|
|
/*
|
|
|
|
* Define an ISA driver
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#define ISA_DRIVER( _name, _probe_addrs, _probe_addr, _mfg_id, _prod_id ) { \
|
|
|
|
.name = _name, \
|
|
|
|
.probe_addrs = _probe_addrs, \
|
|
|
|
.addr_count = sizeof ( _probe_addrs ) / sizeof ( probe_addrs[0] ), \
|
|
|
|
.probe_addr = _probe_addr, \
|
|
|
|
.mfg_id = _mfg_id, \
|
|
|
|
.prod_id = _prod_id, \
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ISA_ROM is parsed by parserom.pl to generate Makefile rules and
|
|
|
|
* files for rom-o-matic.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#define ISA_ROM( IMAGE, DESCRIPTION )
|
2005-03-08 18:53:11 +00:00
|
|
|
|
2005-04-14 18:46:43 +00:00
|
|
|
/*
|
|
|
|
* Functions in isa.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern int find_isa_device ( struct isa_device *eisa,
|
|
|
|
struct isa_driver *driver );
|
|
|
|
extern int find_isa_boot_device ( struct dev *dev,
|
|
|
|
struct isa_driver *driver );
|
2005-03-08 18:53:11 +00:00
|
|
|
|
2005-04-14 18:46:43 +00:00
|
|
|
/*
|
|
|
|
* config.c defines isa_extra_probe_addrs and isa_extra_probe_addr_count.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern struct isa_probe_addr isa_extra_probe_addrs[];
|
|
|
|
extern unsigned int isa_extra_probe_addr_count;
|
2005-03-08 18:53:11 +00:00
|
|
|
|
|
|
|
#endif /* ISA_H */
|
|
|
|
|