path: root/flash.h
diff options
authorStefan Tauner <>2012-02-17 14:51:04 +0000
committerStefan Tauner <>2012-02-17 14:51:04 +0000
commitac1b4c8bd707c07e9636bedbd823ed5cb46f89ad (patch)
tree5553eec8f0f86f363220a979342d59e3c55eae58 /flash.h
parentac427b22c4fa45936fe94af31a5e0422dd95c152 (diff)
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: (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 <> on W25Q64CV + dediprog Tested-by: Stefan Tauner <> 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 <> Acked-by: Carl-Daniel Hailfinger <>
Diffstat (limited to 'flash.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/flash.h b/flash.h
index 20db343..0dac13d 100644
--- a/flash.h
+++ b/flash.h
@@ -175,6 +175,8 @@ struct flashctx {
struct registered_programmer *pgm;
+typedef int (erasefunc_t)(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
#define TEST_OK_PROBE (1 << 0)
OpenPOWER on IntegriCloud