summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2008-06-24 20:32:21 +0200
committerMichael Brown2008-06-27 23:39:25 +0200
commit4c75e9ded4e2442d13fe6d3054427a8f5315677a (patch)
tree37ea5a569fd9b2d4f046a85f17bc6077bcaa0f5d
parent[misc] Fix building on OpenBSD (diff)
downloadipxe-4c75e9ded4e2442d13fe6d3054427a8f5315677a.tar.gz
ipxe-4c75e9ded4e2442d13fe6d3054427a8f5315677a.tar.xz
ipxe-4c75e9ded4e2442d13fe6d3054427a8f5315677a.zip
[nvs] Add support for ST M25P32 SPI flash devices
-rw-r--r--src/include/gpxe/spi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/gpxe/spi.h b/src/include/gpxe/spi.h
index fe38cb6bb..8f90e3d46 100644
--- a/src/include/gpxe/spi.h
+++ b/src/include/gpxe/spi.h
@@ -225,6 +225,15 @@ init_at25040 ( struct spi_device *device ) {
init_spi ( device );
}
+/** ST M25P32 serial flash */
+static inline __attribute__ (( always_inline )) void
+init_m25p32 ( struct spi_device *device ) {
+ device->address_len = 24;
+ device->nvs.size = ( 4 * 1024 * 1024 );
+ device->nvs.block_size = 256;
+ init_spi ( device );
+}
+
/** Microchip 25XX640 serial EEPROM */
static inline __attribute__ (( always_inline )) void
init_mc25xx640 ( struct spi_device *device ) {