david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[nvs] Add init function for Atmel 93C66 EEPROM

The 93C66 is identical to the 93C56 in programming interface and
addressing, but twice as large in data storage (4096 bits). It's
used in some RTL8185 wireless cards.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
This commit is contained in:
Joshua Oreman 2009-06-01 18:36:25 -07:00 committed by Michael Brown
parent 558c1a45fe
commit 743ebc2f4b
1 changed files with 13 additions and 0 deletions

View File

@ -87,6 +87,19 @@ init_at93c56 ( struct spi_device *device, unsigned int organisation ) {
init_at93cx6 ( device, organisation );
}
/**
* Initialise Atmel AT93C66 serial EEPROM
*
* @v device SPI device
* @v organisation Word organisation (8 or 16)
*/
static inline __attribute__ (( always_inline )) void
init_at93c66 ( struct spi_device *device, unsigned int organisation ) {
device->nvs.size = ( 4096 / organisation );
device->address_len = ( ( organisation == 8 ) ? 9 : 8 );
init_at93cx6 ( device, organisation );
}
/** @} */
#endif /* _GPXE_THREEWIRE_H */