iPXE
3c529.c
Go to the documentation of this file.
00001 /*
00002  * Split out from 3c509.c to make build process more sane
00003  *
00004  */
00005 
00006 FILE_LICENCE ( BSD2 );
00007 
00008 #include "etherboot.h"
00009 #include <ipxe/mca.h>
00010 #include <ipxe/isa.h> /* for ISA_ROM */
00011 #include "nic.h"
00012 #include "3c509.h"
00013 
00014 /*
00015  * Several other pieces of the MCA support code were shamelessly
00016  * borrowed from the Linux kernel source.
00017  *
00018  * MCA support added by Adam Fritzler (mid@auk.cx)
00019  *
00020  * Generalised out of the 3c529 driver and into a bus type by Michael
00021  * Brown <mbrown@fensystems.co.uk>
00022  *
00023  */
00024 
00025 static int t529_probe ( struct nic *nic, struct mca_device *mca ) {
00026 
00027         /* Retrieve NIC parameters from MCA device parameters */
00028         nic->ioaddr = ( ( mca->pos[4] & 0xfc ) | 0x02 ) << 8;
00029         nic->irqno = mca->pos[5] & 0x0f;
00030         printf ( "3c529 board found on MCA at %#hx IRQ %d -",
00031                  nic->ioaddr, nic->irqno );
00032 
00033         /* Hand off to generic t5x9 probe routine */
00034         return t5x9_probe ( nic, MCA_ID ( mca ), 0xffff );
00035 }
00036 
00037 static void t529_disable ( struct nic *nic, struct mca_device *mca __unused ) {
00038         t5x9_disable ( nic );
00039 }
00040 
00041 static struct mca_device_id el3_mca_adapters[] = {
00042         { "3Com 3c529 EtherLink III (10base2)", 0x627c },
00043         { "3Com 3c529 EtherLink III (10baseT)", 0x627d },
00044         { "3Com 3c529 EtherLink III (test mode)", 0x62db },
00045         { "3Com 3c529 EtherLink III (TP or coax)", 0x62f6 },
00046         { "3Com 3c529 EtherLink III (TP)", 0x62f7 },
00047 };
00048 
00049 MCA_DRIVER ( t529_driver, el3_mca_adapters );
00050 
00051 DRIVER ( "3c529", nic_driver, mca_driver, t529_driver,
00052          t529_probe, t529_disable );
00053 
00054 ISA_ROM( "3c529", "3c529 == MCA 3c509" );
00055 
00056 /*
00057  * Local variables:
00058  *  c-basic-offset: 8
00059  *  c-indent-level: 8
00060  *  tab-width: 8
00061  * End:
00062  */