mirror of
https://github.com/ipxe/ipxe
synced 2026-01-01 17:34:42 +03:00
Added friendly enable/disable functions
This commit is contained in:
@@ -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 <20>s. Spec says 500 <20>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 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user