diff options
| author | Michael Brown | 2005-04-22 04:43:24 +0200 |
|---|---|---|
| committer | Michael Brown | 2005-04-22 04:43:24 +0200 |
| commit | 97346a75f7f60e502d0485ead4500c4590fa30b0 (patch) | |
| tree | 36aa4861e530ddd4870b0a18bc245d9e1235d76b /src/drivers/bus/eisa.c | |
| parent | Updated all common buses to new API. (diff) | |
| download | ipxe-97346a75f7f60e502d0485ead4500c4590fa30b0.tar.gz ipxe-97346a75f7f60e502d0485ead4500c4590fa30b0.tar.xz ipxe-97346a75f7f60e502d0485ead4500c4590fa30b0.zip | |
Added friendly enable/disable functions
Diffstat (limited to 'src/drivers/bus/eisa.c')
| -rw-r--r-- | src/drivers/bus/eisa.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/drivers/bus/eisa.c b/src/drivers/bus/eisa.c index 2ec86a2e7..bb8df6617 100644 --- a/src/drivers/bus/eisa.c +++ b/src/drivers/bus/eisa.c @@ -155,10 +155,10 @@ void eisa_fill_nic ( struct nic *nic, struct eisa_device *eisa ) { } /* - * Reset and enable an EISA device + * Reset and enable/disable an EISA device * */ -void enable_eisa_device ( struct eisa_device *eisa ) { +void eisa_device_enabled ( struct eisa_device *eisa, int enabled ) { /* Set reset line high for 1000 µs. Spec says 500 µs, but * this doesn't work for all cards, so we are conservative. */ @@ -168,6 +168,7 @@ void enable_eisa_device ( struct eisa_device *eisa ) { /* Set reset low and write a 1 to ENABLE. Delay again, in * case the card takes a while to wake up. */ - outb ( EISA_CMD_ENABLE, eisa->ioaddr + EISA_GLOBAL_CONFIG ); + outb ( enabled ? EISA_CMD_ENABLE : 0, + eisa->ioaddr + EISA_GLOBAL_CONFIG ); udelay ( 1000 ); /* Must wait 800 */ } |
