kernels/linux-2.4.0/drivers/net/3c509.c
/* Read a word from the EEPROM when in the ISA ID probe state. */
Read a word from the EEPROM when in the ISA ID probe state.
Read a word from the EEPROM when in the ISA ID probe state .
static ushort id_read_eeprom(int index)
{
	int bit, word = 0;
	outb(EEPROM_READ + index, id_port);
	udelay (500);
	for (bit = 15; bit >= 0; bit--)
		word = (word << 1) + (inb(id_port) & 0x01);
	if (el3_debug > 3)
		printk("  3c509 EEPROM word %d %#4.4x.\n", index, word);
	return word;
}
static ushort id_read_eeprom ( int index ) { int bit , word = 0 ; outb ( EEPROM_READ + index , id_port ) ; udelay ( 500 ) ; for ( bit = 15 ; bit >= 0 ; bit -- ) word = ( word << 1 ) + ( inb ( id_port ) & 0x01 ) ; if ( el3_debug > 3 ) printk ( " \n " , index , word ) ; return word ; }
Read a word from the EEPROM when in the ISA ID probe state.
Read a word from the EEPROM when in the ISA ID probe state .
/* Issue read command, and pause for at least 162 us. for it to complete.
	   Assume extra-fast 16Mhz bus. */ /* Pause for at least 162 us. for the read to take place. */