summaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-10-15 11:20:58 +0200
committerNico Huber <nico.h@gmx.de>2017-12-28 10:41:38 +0000
commita3140d0b18058610a2694fc3592031a849b0c92a (patch)
tree194083a9889bb76a70cb447a14660d6ec449506c /flash.h
parentc8801734727e1e510cbd99e305007b73f9f57e93 (diff)
downloadflashrom-a3140d0b18058610a2694fc3592031a849b0c92a.tar.gz
flashrom-a3140d0b18058610a2694fc3592031a849b0c92a.tar.bz2
flashrom-a3140d0b18058610a2694fc3592031a849b0c92a.zip
spi25: Introduce spi_simple_write_cmd()
spi_simple_write_cmd() executes WREN plus a single byte write and polls WIP afterwards. It's used to replace current spi_erase_chip_*() imple- mentations. Change-Id: Ib244356fa471e15863b52e6037899d19113cb4a9 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22382 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/flash.h b/flash.h
index 62f2e344c..b18d698d8 100644
--- a/flash.h
+++ b/flash.h
@@ -369,6 +369,7 @@ struct spi_command {
const unsigned char *writearr;
unsigned char *readarr;
};
+#define NULL_SPI_CMD { 0, 0, NULL, NULL, }
int spi_send_command(struct flashctx *flash, unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr);
int spi_send_multicommand(struct flashctx *flash, struct spi_command *cmds);
uint32_t spi_get_valid_read_addr(struct flashctx *flash);