summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Oreman2009-06-02 03:36:25 +0200
committerMichael Brown2009-06-23 11:33:10 +0200
commit743ebc2f4b056673efb26f294ab39a661d77d1a8 (patch)
tree0103c21c7dd960c74c10373767502a1e3f7fcf1e
parent[tcp] Improve robustness in the presence of duplicated received packets (diff)
downloadipxe-743ebc2f4b056673efb26f294ab39a661d77d1a8.tar.gz
ipxe-743ebc2f4b056673efb26f294ab39a661d77d1a8.tar.xz
ipxe-743ebc2f4b056673efb26f294ab39a661d77d1a8.zip
[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>
-rw-r--r--src/include/gpxe/threewire.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/gpxe/threewire.h b/src/include/gpxe/threewire.h
index 2db67260..e23284af 100644
--- a/src/include/gpxe/threewire.h
+++ b/src/include/gpxe/threewire.h
@@ -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 */