From 2c1e8d2cb13e2c46c43968765f220ef64f416940 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 24 Apr 2012 21:48:48 +0100 Subject: [natsemi] Replace driver for National Semicondutor NICs Signed-off-by: Michael Brown --- src/include/ipxe/threewire.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/include') diff --git a/src/include/ipxe/threewire.h b/src/include/ipxe/threewire.h index 135ef56a3..b5513ecdd 100644 --- a/src/include/ipxe/threewire.h +++ b/src/include/ipxe/threewire.h @@ -61,6 +61,19 @@ init_at93cx6 ( struct spi_device *device, unsigned int organisation ) { device->nvs.write = threewire_write; } +/** + * Initialise Atmel AT93C06 serial EEPROM + * + * @v device SPI device + * @v organisation Word organisation (8 or 16) + */ +static inline __attribute__ (( always_inline )) void +init_at93c06 ( struct spi_device *device, unsigned int organisation ) { + device->nvs.size = ( 256 / organisation ); + device->address_len = ( ( organisation == 8 ) ? 7 : 6 ); + init_at93cx6 ( device, organisation ); +} + /** * Initialise Atmel AT93C46 serial EEPROM * -- cgit v1.2.3-55-g7522