소스 검색

[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>
tags/v0.9.8
Joshua Oreman 15 년 전
부모
커밋
743ebc2f4b
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13
    0
      src/include/gpxe/threewire.h

+ 13
- 0
src/include/gpxe/threewire.h 파일 보기

@@ -87,6 +87,19 @@ init_at93c56 ( struct spi_device *device, unsigned int organisation ) {
87 87
 	init_at93cx6 ( device, organisation );
88 88
 }
89 89
 
90
+/**
91
+ * Initialise Atmel AT93C66 serial EEPROM
92
+ *
93
+ * @v device		SPI device
94
+ * @v organisation	Word organisation (8 or 16)
95
+ */
96
+static inline __attribute__ (( always_inline )) void
97
+init_at93c66 ( struct spi_device *device, unsigned int organisation ) {
98
+	device->nvs.size = ( 4096 / organisation );
99
+	device->address_len = ( ( organisation == 8 ) ? 9 : 8 );
100
+	init_at93cx6 ( device, organisation );
101
+}
102
+
90 103
 /** @} */
91 104
 
92 105
 #endif /* _GPXE_THREEWIRE_H */

Loading…
취소
저장