david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[smc9000] Avoid using CONFIG as a preprocessor macro

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2014-08-19 14:38:27 +01:00
parent 8ab9f3ca38
commit 3953ddd2ac
2 changed files with 6 additions and 6 deletions

View File

@ -882,7 +882,7 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {
/* is it using AUI or 10BaseT ? */
SMC_SELECT_BANK(nic->ioaddr, 1);
if (inw(nic->ioaddr + CONFIG) & CFG_AUI_SELECT)
if (inw(nic->ioaddr + CFG) & CFG_AUI_SELECT)
media = 2;
else
media = 1;
@ -911,12 +911,12 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {
/* Select which interface to use */
SMC_SELECT_BANK(nic->ioaddr, 1);
if ( media == 1 ) {
_outw( inw( nic->ioaddr + CONFIG ) & ~CFG_AUI_SELECT,
nic->ioaddr + CONFIG );
_outw( inw( nic->ioaddr + CFG ) & ~CFG_AUI_SELECT,
nic->ioaddr + CFG );
}
else if ( media == 2 ) {
_outw( inw( nic->ioaddr + CONFIG ) | CFG_AUI_SELECT,
nic->ioaddr + CONFIG );
_outw( inw( nic->ioaddr + CFG ) | CFG_AUI_SELECT,
nic->ioaddr + CFG );
}
smc_phy_configure(nic->ioaddr);

View File

@ -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)
/* BANK 1 */
#define CONFIG 0
#define CFG 0
#define CFG_AUI_SELECT 0x100
#define BASE 2
#define ADDR0 4