specification of ISA_PROBE_ADDRS.
* instead. Some cards (e.g. the 3c509) implement a proprietary
* ISAPnP-like mechanism.
*
- * The ISA probe address list can be overridden by config.c; if
+ * The ISA probe address list can be overridden by config.c; if the
+ * user specifies ISA_PROBE_ADDRS then that list will be used first.
+ * (If ISA_PROBE_ADDRS ends with a zero, the driver's own list will
+ * never be used).
*/
/*
}
/* Set I/O address */
- ioaddr = isa_extra_probe_addrs[i].addr;
+ ioaddr = isa_extra_probe_addrs[i];
/* An I/O address of 0 in extra_probe_addrs list means
* stop probing (i.e. don't continue to the
}
/* Set I/O address */
- ioaddr = driver->probe_addrs[i].addr;
+ ioaddr = driver->probe_addrs[i];
/* Use probe_addr method to see if there's a device
* present at this address.
ETH_PROBE - Look for an adapter
***************************************************************************/
-static int cs89x0_probe_addr ( uint16_t ioaddr ) {
+static int cs89x0_probe_addr ( isa_probe_addr_t ioaddr ) {
/* if they give us an odd I/O address, then do ONE write to
the address port, to get it back to address zero, where we
expect to find the EISA signature word. */
return 1;
}
-static struct isa_probe_addr cs89x0_probe_addrs[] = {
+static isa_probe_addr_t cs89x0_probe_addrs[] = {
#ifndef EMBEDDED
/* use "conservative" default values for autoprobing */
- { 0x300 }, { 0x320 }, { 0x340 }, { 0x200 }, { 0x220 }, { 0x240 },
- { 0x260 }, { 0x280 }, { 0x2a0 }, { 0x2c0 }, { 0x2e0 },
+ 0x300, 0x320, 0x340, 0x200, 0x220, 0x240,
+ 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0,
/* if that did not work, then be more aggressive */
- { 0x301 }, { 0x321 }, { 0x341 }, { 0x201 }, { 0x221 }, { 0x241 },
- { 0x261 }, { 0x281 }, { 0x2a1 }, { 0x2c1 }, { 0x2e1 },
+ 0x301, 0x321, 0x341, 0x201, 0x221, 0x241,
+ 0x261, 0x281, 0x2a1, 0x2c1, 0x2e1,
#else
0x01000300,
#endif
static u8 nicsr;
-static int depca_probe1 ( uint16_t ioaddr ) {
+static int depca_probe1 ( isa_probe_addr_t ioaddr ) {
u8 data;
/* This is only correct for little endian machines, but then
Etherboot doesn't work on anything but a PC */
return 1;
}
-static struct isa_probe_addr depca_probe_addrs[] = {
- { 0x300 }, { 0x200 },
+static isa_probe_addr_t depca_probe_addrs[] = {
+ 0x300, 0x200,
};
static struct isa_driver depca_driver =
return (retval);
}
-static int eepro_probe1 ( uint16_t ioaddr ) {
+static int eepro_probe1 ( isa_probe_addr_t ioaddr ) {
int id, counter;
id = inb(ioaddr + ID_REG);
return 1;
}
-static struct isa_probe_addr eepro_probe_addrs[] = {
- { 0x300 },
- { 0x210 }, { 0x240 }, { 0x280 }, { 0x2C0 }, { 0x200 },
- { 0x320 }, { 0x340 }, { 0x360 },
+static isa_probe_addr_t eepro_probe_addrs[] = {
+ 0x300, 0x210, 0x240, 0x280, 0x2C0, 0x200, 0x320, 0x340, 0x360,
};
static struct isa_driver eepro_driver =
*
**************************************************************************
*/
-static int skel_isa_probe_addr ( uint16_t ioaddr __unused ) {
+static int skel_isa_probe_addr ( isa_probe_addr_t ioaddr __unused ) {
return 0;
}
return 1;
}
-static struct isa_probe_addr skel_isa_probe_addrs[] = {
+static isa_probe_addr_t skel_isa_probe_addrs[] = {
/*
- { 0x200 }, { 0x240 },
+ 0x200, 0x240,
*/
};
*
* ---------------------------------------------------------------------
*/
-static int smc9000_probe_addr( unsigned short ioaddr )
+static int smc9000_probe_addr( isa_probe_addr_t ioaddr )
{
word bank;
word revision_register;
* change for a slightly different card, you can add it to the array.
*
*/
-static struct isa_probe_addr smc9000_probe_addrs[] = {
- { 0x200 }, { 0x220 }, { 0x240 }, { 0x260 },
- { 0x280 }, { 0x2A0 }, { 0x2C0 }, { 0x2E0 },
- { 0x300 }, { 0x320 }, { 0x340 }, { 0x360 },
- { 0x380 }, { 0x3A0 }, { 0x3C0 }, { 0x3E0 },
+static isa_probe_addr_t smc9000_probe_addrs[] = {
+ 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
+ 0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0,
};
static struct isa_driver smc9000_driver =
* An individual ISA device, identified by probe address
*
*/
-struct isa_probe_addr {
- uint16_t addr;
-} __attribute__ (( packed ));
+typedef uint16_t isa_probe_addr_t;
/*
* An ISA driver, with a probe address list and a probe_addr method.
*/
struct isa_driver {
const char *name;
- struct isa_probe_addr *probe_addrs;
+ isa_probe_addr_t *probe_addrs;
unsigned int addr_count;
- int ( * probe_addr ) ( uint16_t addr );
+ int ( * probe_addr ) ( isa_probe_addr_t addr );
uint16_t mfg_id;
uint16_t prod_id;
};
* config.c defines isa_extra_probe_addrs and isa_extra_probe_addr_count.
*
*/
-extern struct isa_probe_addr isa_extra_probe_addrs[];
+extern isa_probe_addr_t isa_extra_probe_addrs[];
extern unsigned int isa_extra_probe_addr_count;
#endif /* ISA_H */