summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/boot/coreboot_tables.h9
-rw-r--r--src/include/spi_flash.h5
2 files changed, 14 insertions, 0 deletions
diff --git a/src/include/boot/coreboot_tables.h b/src/include/boot/coreboot_tables.h
index a3cf2bd761..74851b2fbb 100644
--- a/src/include/boot/coreboot_tables.h
+++ b/src/include/boot/coreboot_tables.h
@@ -286,6 +286,15 @@ struct lb_ram_code {
uint32_t ram_code;
};
+#define LB_TAG_SPI_FLASH 0x0029
+struct lb_spi_flash {
+ uint32_t tag;
+ uint32_t size;
+ uint32_t flash_size;
+ uint32_t sector_size;
+ uint32_t erase_cmd;
+};
+
/* The following structures are for the cmos definitions table */
#define LB_TAG_CMOS_OPTION_TABLE 200
/* cmos header record */
diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h
index 8b8b0c54fe..cbb5919332 100644
--- a/src/include/spi_flash.h
+++ b/src/include/spi_flash.h
@@ -27,6 +27,7 @@
#include <stddef.h>
#include <console/console.h>
#include <spi-generic.h>
+#include <boot/coreboot_tables.h>
struct spi_flash {
struct spi_slave *spi;
@@ -37,6 +38,8 @@ struct spi_flash {
u32 sector_size;
+ u8 erase_cmd;
+
int (*read)(struct spi_flash *flash, u32 offset,
size_t len, void *buf);
int (*write)(struct spi_flash *flash, u32 offset,
@@ -47,4 +50,6 @@ struct spi_flash {
struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs);
+void lb_spi_flash(struct lb_header *header);
+
#endif /* _SPI_FLASH_H_ */