瀏覽代碼

[nvs] Add support for ST M25P32 SPI flash devices

tags/v0.9.4
Michael Brown 16 年之前
父節點
當前提交
4c75e9ded4
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9
    0
      src/include/gpxe/spi.h

+ 9
- 0
src/include/gpxe/spi.h 查看文件

@@ -225,6 +225,15 @@ init_at25040 ( struct spi_device *device ) {
225 225
 	init_spi ( device );
226 226
 }
227 227
 
228
+/** ST M25P32 serial flash */
229
+static inline __attribute__ (( always_inline )) void
230
+init_m25p32 ( struct spi_device *device ) {
231
+	device->address_len = 24;
232
+	device->nvs.size = ( 4 * 1024 * 1024 );
233
+	device->nvs.block_size = 256;
234
+	init_spi ( device );
235
+}
236
+
228 237
 /** Microchip 25XX640 serial EEPROM */
229 238
 static inline __attribute__ (( always_inline )) void
230 239
 init_mc25xx640 ( struct spi_device *device ) {

Loading…
取消
儲存