mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
Add support for SFDP (JESD216)
Similar to modules using the opaque programmer framework (e.g. ICH Hardware Sequencing) this uses a template struct flashchip element in flashchips.c with a special probe function that fills the obtained values into that struct. This allows yet unknown SPI chips to be supported (read, erase, write) almost as if it was already added to flashchips.c. Documentation used: http://www.jedec.org/standards-documents/docs/jesd216 (2011-04) W25Q32BV data sheet Revision F (2011-04-01) EN25QH16 data sheet Revision F (2011-06-01) MX25L6436E data sheet Revision 1.8 (2011-12-26) Tested-by: David Hendricks <dhendrix@google.com> on W25Q64CV + dediprog Tested-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> on a 2010 MX25L6436E with preliminary (i.e. incorrect) SFDP implementation + serprog Thanks also to Michael Karcher for his comments and preliminary review! Corresponding to flashrom svn r1500. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
@ -41,6 +41,7 @@ int spi_block_erase_d7(struct flashctx *flash, unsigned int addr, unsigned int b
|
||||
int spi_block_erase_d8(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
|
||||
int spi_block_erase_60(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
|
||||
int spi_block_erase_c7(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
|
||||
erasefunc_t *spi_get_erasefn_from_opcode(uint8_t opcode);
|
||||
int spi_chip_write_1(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
|
||||
int spi_chip_write_256(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
|
||||
int spi_chip_read(struct flashctx *flash, uint8_t *buf, unsigned int start, int unsigned len);
|
||||
@ -58,6 +59,9 @@ int spi_read_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start, u
|
||||
int spi_write_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len, unsigned int chunksize);
|
||||
int spi_aai_write(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
|
||||
|
||||
/* sfdp.c */
|
||||
int probe_spi_sfdp(struct flashctx *flash);
|
||||
|
||||
/* opaque.c */
|
||||
int probe_opaque(struct flashctx *flash);
|
||||
int read_opaque(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
|
||||
|
Reference in New Issue
Block a user