Browse Source

[nvs] Add support for ST M25P32 SPI flash devices

tags/v0.9.4
Michael Brown 16 years ago
parent
commit
4c75e9ded4
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      src/include/gpxe/spi.h

+ 9
- 0
src/include/gpxe/spi.h View File

225
 	init_spi ( device );
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
 /** Microchip 25XX640 serial EEPROM */
237
 /** Microchip 25XX640 serial EEPROM */
229
 static inline __attribute__ (( always_inline )) void
238
 static inline __attribute__ (( always_inline )) void
230
 init_mc25xx640 ( struct spi_device *device ) {
239
 init_mc25xx640 ( struct spi_device *device ) {

Loading…
Cancel
Save