2005-04-14 12:23:12 +00:00
|
|
|
/*
|
|
|
|
* Split out from 3c509.c to make build process more sane
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "etherboot.h"
|
|
|
|
#include "mca.h"
|
2005-04-14 14:31:11 +00:00
|
|
|
#include "isa.h" /* for ISA_ROM */
|
2005-04-14 12:23:12 +00:00
|
|
|
#include "nic.h"
|
|
|
|
#include "3c509.h"
|
|
|
|
|
|
|
|
/*
|
2005-04-14 13:49:58 +00:00
|
|
|
* Several other pieces of the MCA support code were shamelessly
|
|
|
|
* borrowed from the Linux kernel source.
|
2005-04-14 12:23:12 +00:00
|
|
|
*
|
|
|
|
* MCA support added by Adam Fritzler (mid@auk.cx)
|
|
|
|
*
|
2005-04-14 13:49:58 +00:00
|
|
|
* Generalised out of the 3c529 driver and into a bus type by Michael
|
|
|
|
* Brown <mbrown@fensystems.co.uk>
|
|
|
|
*
|
2005-04-14 12:23:12 +00:00
|
|
|
*/
|
|
|
|
|
2005-04-22 11:57:35 +00:00
|
|
|
static int t529_probe ( struct nic *nic, struct mca_device *mca ) {
|
2005-04-14 12:23:12 +00:00
|
|
|
|
|
|
|
/* Retrieve NIC parameters from MCA device parameters */
|
2005-04-22 11:57:35 +00:00
|
|
|
mca_fill_nic ( nic, mca );
|
2005-04-14 12:23:12 +00:00
|
|
|
nic->ioaddr = ( ( mca->pos[4] & 0xfc ) | 0x02 ) << 8;
|
|
|
|
nic->irqno = mca->pos[5] & 0x0f;
|
2005-04-22 11:57:35 +00:00
|
|
|
printf ( "3c529 board found on MCA at %#hx IRQ %d -",
|
|
|
|
nic->ioaddr, nic->irqno );
|
2005-04-14 12:23:12 +00:00
|
|
|
|
|
|
|
/* Hand off to generic t5x9 probe routine */
|
|
|
|
return t5x9_probe ( nic, MCA_ID ( mca ), 0xffff );
|
|
|
|
}
|
|
|
|
|
2005-04-22 12:07:22 +00:00
|
|
|
static void t529_disable ( struct nic *nic, struct mca_device *mca __unused ) {
|
2005-04-22 11:57:35 +00:00
|
|
|
t5x9_disable ( nic );
|
|
|
|
}
|
|
|
|
|
2005-04-14 13:49:58 +00:00
|
|
|
static struct mca_id el3_mca_adapters[] = {
|
|
|
|
{ "3Com 3c529 EtherLink III (10base2)", 0x627c },
|
|
|
|
{ "3Com 3c529 EtherLink III (10baseT)", 0x627d },
|
|
|
|
{ "3Com 3c529 EtherLink III (test mode)", 0x62db },
|
|
|
|
{ "3Com 3c529 EtherLink III (TP or coax)", 0x62f6 },
|
|
|
|
{ "3Com 3c529 EtherLink III (TP)", 0x62f7 },
|
|
|
|
};
|
|
|
|
|
2005-04-26 12:19:39 +00:00
|
|
|
MCA_DRIVER ( t529_driver, el3_mca_adapters );
|
2005-04-14 13:49:58 +00:00
|
|
|
|
2005-04-22 11:57:35 +00:00
|
|
|
DRIVER ( "3c529", nic_driver, mca_driver, t529_driver,
|
|
|
|
t529_probe, t529_disable );
|
2005-04-14 13:49:58 +00:00
|
|
|
|
|
|
|
ISA_ROM( "3c529", "3c529 == MCA 3c509" );
|