mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 14:11:15 +02:00
Trivial SPI cleanups
While writing a new SPI driver I fixed some things in the SPI code: All calls to spi_command() had unneccessary #define duplications, and in some cases the read count define could theoretically become harmful because NULL was passed for the read buffer. Avoid a crash, should someone change the #defines. I also noticed that the only caller of spi_page_program() was the it87 driver, and spi_page_program() could only call back into the it87 driver. Removed the function for easier-to-follow code and made it8716f_spi_page_program() static. The ichspi driver's static page functions are already static. Corresponding to flashrom svn r302 and coreboot v2 svn r3418. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
This commit is contained in:
2
spi.h
2
spi.h
@ -49,7 +49,7 @@
|
||||
#define JEDEC_CE_60_OUTSIZE 0x01
|
||||
#define JEDEC_CE_60_INSIZE 0x00
|
||||
|
||||
/* Chip Erase 0xc7 is supported by ST/EON/Macronix chips. */
|
||||
/* Chip Erase 0xc7 is supported by SST/ST/EON/Macronix chips. */
|
||||
#define JEDEC_CE_C7 0xc7
|
||||
#define JEDEC_CE_C7_OUTSIZE 0x01
|
||||
#define JEDEC_CE_C7_INSIZE 0x00
|
||||
|
Reference in New Issue
Block a user