iPXE
3c529.c
Go to the documentation of this file.
1/*
2 * Split out from 3c509.c to make build process more sane
3 *
4 */
5
6FILE_LICENCE ( BSD2 );
7
8#include "etherboot.h"
9#include <ipxe/mca.h>
10#include <ipxe/isa.h> /* for ISA_ROM */
11#include "nic.h"
12#include "3c509.h"
13
14/*
15 * Several other pieces of the MCA support code were shamelessly
16 * borrowed from the Linux kernel source.
17 *
18 * MCA support added by Adam Fritzler (mid@auk.cx)
19 *
20 * Generalised out of the 3c529 driver and into a bus type by Michael
21 * Brown <mbrown@fensystems.co.uk>
22 *
23 */
24
25static int t529_probe ( struct nic *nic, struct mca_device *mca ) {
26
27 /* Retrieve NIC parameters from MCA device parameters */
28 nic->ioaddr = ( ( mca->pos[4] & 0xfc ) | 0x02 ) << 8;
29 nic->irqno = mca->pos[5] & 0x0f;
30 printf ( "3c529 board found on MCA at %#hx IRQ %d -",
31 nic->ioaddr, nic->irqno );
32
33 /* Hand off to generic t5x9 probe routine */
34 return t5x9_probe ( nic, MCA_ID ( mca ), 0xffff );
35}
36
37static void t529_disable ( struct nic *nic, struct mca_device *mca __unused ) {
38 t5x9_disable ( nic );
39}
40
42 { "3Com 3c529 EtherLink III (10base2)", 0x627c },
43 { "3Com 3c529 EtherLink III (10baseT)", 0x627d },
44 { "3Com 3c529 EtherLink III (test mode)", 0x62db },
45 { "3Com 3c529 EtherLink III (TP or coax)", 0x62f6 },
46 { "3Com 3c529 EtherLink III (TP)", 0x62f7 },
47};
48
50
51DRIVER ( "3c529", nic_driver, mca_driver, t529_driver,
53
54ISA_ROM( "3c529", "3c529 == MCA 3c509" );
55
56/*
57 * Local variables:
58 * c-basic-offset: 8
59 * c-indent-level: 8
60 * tab-width: 8
61 * End:
62 */
void t5x9_disable(struct nic *nic)
Definition 3c5x9.c:40
int t5x9_probe(struct nic *nic, uint16_t prod_id_check, uint16_t prod_id_mask)
Definition 3c5x9.c:342
static int t529_probe(struct nic *nic, struct mca_device *mca)
Definition 3c529.c:25
static struct mca_device_id el3_mca_adapters[]
Definition 3c529.c:41
static void t529_disable(struct nic *nic, struct mca_device *mca __unused)
Definition 3c529.c:37
#define __unused
Declare a variable or data structure as unused.
Definition compiler.h:573
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define ISA_ROM(IMAGE, DESCRIPTION)
Definition isa.h:92
#define MCA_ID(mca)
Definition mca.h:55
#define MCA_DRIVER(_name, _ids)
Definition nic.h:167
#define DRIVER(_name_text, _unused2, _unused3, _name, _probe, _disable, _fake_bss)
Definition nic.h:220
struct @002057171240057303273132130141036221271355330106 no_fake_bss
An MCA device ID list entry.
Definition mca.h:30
An MCA device.
Definition mca.h:38
unsigned char pos[8]
POS register values.
Definition mca.h:44
An MCA driver.
Definition mca.h:58
Definition nic.h:49
unsigned char irqno
Definition nic.h:56
unsigned int ioaddr
Definition nic.h:55
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition vsprintf.c:465