mirror of https://github.com/ipxe/ipxe.git
[smc9000] Avoid using CONFIG as a preprocessor macro
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/25/head
parent
8ab9f3ca38
commit
3953ddd2ac
|
@ -882,7 +882,7 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {
|
||||||
|
|
||||||
/* is it using AUI or 10BaseT ? */
|
/* is it using AUI or 10BaseT ? */
|
||||||
SMC_SELECT_BANK(nic->ioaddr, 1);
|
SMC_SELECT_BANK(nic->ioaddr, 1);
|
||||||
if (inw(nic->ioaddr + CONFIG) & CFG_AUI_SELECT)
|
if (inw(nic->ioaddr + CFG) & CFG_AUI_SELECT)
|
||||||
media = 2;
|
media = 2;
|
||||||
else
|
else
|
||||||
media = 1;
|
media = 1;
|
||||||
|
@ -911,12 +911,12 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {
|
||||||
/* Select which interface to use */
|
/* Select which interface to use */
|
||||||
SMC_SELECT_BANK(nic->ioaddr, 1);
|
SMC_SELECT_BANK(nic->ioaddr, 1);
|
||||||
if ( media == 1 ) {
|
if ( media == 1 ) {
|
||||||
_outw( inw( nic->ioaddr + CONFIG ) & ~CFG_AUI_SELECT,
|
_outw( inw( nic->ioaddr + CFG ) & ~CFG_AUI_SELECT,
|
||||||
nic->ioaddr + CONFIG );
|
nic->ioaddr + CFG );
|
||||||
}
|
}
|
||||||
else if ( media == 2 ) {
|
else if ( media == 2 ) {
|
||||||
_outw( inw( nic->ioaddr + CONFIG ) | CFG_AUI_SELECT,
|
_outw( inw( nic->ioaddr + CFG ) | CFG_AUI_SELECT,
|
||||||
nic->ioaddr + CONFIG );
|
nic->ioaddr + CFG );
|
||||||
}
|
}
|
||||||
|
|
||||||
smc_phy_configure(nic->ioaddr);
|
smc_phy_configure(nic->ioaddr);
|
||||||
|
|
|
@ -131,7 +131,7 @@ typedef unsigned long int dword;
|
||||||
#define RPC_DEFAULT (RPC_ANEG | (RPC_LED_100 << RPC_LSXA_SHFT) | (RPC_LED_FD << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)
|
#define RPC_DEFAULT (RPC_ANEG | (RPC_LED_100 << RPC_LSXA_SHFT) | (RPC_LED_FD << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)
|
||||||
|
|
||||||
/* BANK 1 */
|
/* BANK 1 */
|
||||||
#define CONFIG 0
|
#define CFG 0
|
||||||
#define CFG_AUI_SELECT 0x100
|
#define CFG_AUI_SELECT 0x100
|
||||||
#define BASE 2
|
#define BASE 2
|
||||||
#define ADDR0 4
|
#define ADDR0 4
|
||||||
|
|
Loading…
Reference in New Issue