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 | |
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')
-rw-r--r-- | src/drivers/bus/eisa.c | 7 | ||||
-rw-r--r-- | src/drivers/bus/isapnp.c | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/drivers/bus/eisa.c b/src/drivers/bus/eisa.c index 2ec86a2e..bb8df661 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 */ } diff --git a/src/drivers/bus/isapnp.c b/src/drivers/bus/isapnp.c index 9157f0be..61ee6843 100644 --- a/src/drivers/bus/isapnp.c +++ b/src/drivers/bus/isapnp.c @@ -607,8 +607,8 @@ struct bus_driver isapnp_driver __bus_driver = { * arbitration. * */ -void activate_isapnp_device ( struct isapnp_device *isapnp, - int activate ) { +void isapnp_device_activation ( struct isapnp_device *isapnp, + int activation ) { /* Wake the card and select the logical device */ isapnp_wait_for_key (); isapnp_send_key (); @@ -616,7 +616,7 @@ void activate_isapnp_device ( struct isapnp_device *isapnp, isapnp_logicaldevice ( isapnp->logdev ); /* Activate/deactivate the logical device */ - isapnp_activate ( activate ); + isapnp_activate ( activation ); isapnp_delay(); /* Return all cards to Wait for Key state */ |