david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Split out EISA driver into a separate file, since 3c509s can only take 16K

ROMs (AFAIK).
This commit is contained in:
Michael Brown 2005-04-17 17:52:33 +00:00
parent 6e4888400c
commit bd2c3b0f27
2 changed files with 40 additions and 37 deletions

View File

@ -0,0 +1,38 @@
/*
* Split out from 3c509.c, since EISA cards are relatively rare, and
* ROM space in 3c509s is very limited.
*
*/
#include "eisa.h"
#include "isa.h"
#include "console.h"
#include "3c509.h"
/*
* The EISA probe function
*
*/
static int el3_eisa_probe ( struct dev *dev, struct eisa_device *eisa ) {
struct nic *nic = nic_device ( dev );
enable_eisa_device ( eisa );
nic->ioaddr = eisa->ioaddr;
nic->irqno = 0;
printf ( "3C5x9 board on EISA at %#hx - ", nic->ioaddr );
/* Hand off to generic t5x9 probe routine */
return t5x9_probe ( nic, ISA_PROD_ID ( PROD_ID ), ISA_PROD_ID_MASK );
}
static struct eisa_id el3_eisa_adapters[] = {
{ "3Com 3c509 EtherLink III (EISA)", MFG_ID, PROD_ID },
};
static struct eisa_driver el3_eisa_driver =
EISA_DRIVER ( "3c509 (EISA)", el3_eisa_adapters );
BOOT_DRIVER ( "3c509 (EISA)", find_eisa_boot_device, el3_eisa_driver,
el3_eisa_probe );
ISA_ROM ( "3c509-eisa","3c509 (EISA)" );

View File

@ -4,12 +4,11 @@
*
*/
#include "eisa.h"
#include "isa.h"
#include "io.h"
#include "timer.h"
#include "string.h"
#include "etherboot.h"
#include "console.h"
#include "3c509.h"
/*
@ -235,38 +234,4 @@ static struct t509_driver el3_t509_driver = { "3c509 (ISA)" };
BOOT_DRIVER ( "3c509", find_t509_boot_device, el3_t509_driver,
el3_t509_probe );
/*
* The EISA probe function
*
*/
static int el3_eisa_probe ( struct dev *dev, struct eisa_device *eisa ) {
struct nic *nic = nic_device ( dev );
enable_eisa_device ( eisa );
nic->ioaddr = eisa->ioaddr;
nic->irqno = 0;
printf ( "3C5x9 board on EISA at %#hx - ", nic->ioaddr );
/* Hand off to generic t5x9 probe routine */
return t5x9_probe ( nic, ISA_PROD_ID ( PROD_ID ), ISA_PROD_ID_MASK );
}
static struct eisa_id el3_eisa_adapters[] = {
{ "3Com 3c509 EtherLink III (EISA)", MFG_ID, PROD_ID },
};
static struct eisa_driver el3_eisa_driver =
EISA_DRIVER ( "3c509 (EISA)", el3_eisa_adapters );
BOOT_DRIVER ( "3c509 (EISA)", find_eisa_boot_device, el3_eisa_driver,
el3_eisa_probe );
/*
* We currently build both ISA and EISA support into a single ROM
* image, though there's no reason why this couldn't be split to
* reduce code size; just split this .c file into two in the obvious
* place.
*
*/
ISA_ROM ( "3c509","3c509, ISA/EISA" );
ISA_ROM ( "3c509","3c509" );