diff options
author | Michael Brown | 2005-04-14 15:49:58 +0200 |
---|---|---|
committer | Michael Brown | 2005-04-14 15:49:58 +0200 |
commit | e0a8ee385ea89bfc6b1eee758834e2e4ad20cc9a (patch) | |
tree | 22562e597b71ed8425efa6cbc2836a0e3b4e647f /src/drivers/net/3c529.c | |
parent | Tweak API to allow separation of bus-scanning and device-probing logic. (diff) | |
download | ipxe-e0a8ee385ea89bfc6b1eee758834e2e4ad20cc9a.tar.gz ipxe-e0a8ee385ea89bfc6b1eee758834e2e4ad20cc9a.tar.xz ipxe-e0a8ee385ea89bfc6b1eee758834e2e4ad20cc9a.zip |
Updated to current device API.
Diffstat (limited to 'src/drivers/net/3c529.c')
-rw-r--r-- | src/drivers/net/3c529.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/drivers/net/3c529.c b/src/drivers/net/3c529.c index 8faf3bf5..876263b6 100644 --- a/src/drivers/net/3c529.c +++ b/src/drivers/net/3c529.c @@ -10,31 +10,18 @@ #include "3c509.h" /* - * This table and several other pieces of the MCA support - * code were shamelessly borrowed from the Linux kernel source. + * Several other pieces of the MCA support code were shamelessly + * borrowed from the Linux kernel source. * * MCA support added by Adam Fritzler (mid@auk.cx) * + * Generalised out of the 3c529 driver and into a bus type by Michael + * Brown <mbrown@fensystems.co.uk> + * */ -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 }, -}; - -static struct mca_driver t529_driver - = MCA_DRIVER ( "3c529", el3_mca_adapters ); -ISA_ROM( "3c529", "3c529 == MCA 3c509" ); - -static int t529_probe ( struct dev *dev ) { +static int t529_probe ( struct dev *dev, struct mca_device *mca ) { struct nic *nic = nic_device ( dev ); - struct mca_device *mca = mca_device ( dev ); - - if ( ! find_mca_device ( mca, &t529_driver ) ) - return 0; /* Retrieve NIC parameters from MCA device parameters */ nic->ioaddr = ( ( mca->pos[4] & 0xfc ) | 0x02 ) << 8; @@ -46,4 +33,17 @@ static int t529_probe ( struct dev *dev ) { return t5x9_probe ( nic, MCA_ID ( mca ), 0xffff ); } -BOOT_DRIVER ( "3c529", t529_probe ); +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 }, +}; + +static struct mca_driver t529_driver + = MCA_DRIVER ( "3c529", el3_mca_adapters ); + +BOOT_DRIVER ( "3c529", find_mca_boot_device, &t529_driver, t529_probe ); + +ISA_ROM( "3c529", "3c529 == MCA 3c509" ); |