diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2012-02-17 14:51:04 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2012-02-17 14:51:04 +0000 |
commit | ac1b4c8bd707c07e9636bedbd823ed5cb46f89ad (patch) | |
tree | 5553eec8f0f86f363220a979342d59e3c55eae58 /flashchips.c | |
parent | ac427b22c4fa45936fe94af31a5e0422dd95c152 (diff) | |
download | flashrom-ac1b4c8bd707c07e9636bedbd823ed5cb46f89ad.tar.gz flashrom-ac1b4c8bd707c07e9636bedbd823ed5cb46f89ad.tar.bz2 flashrom-ac1b4c8bd707c07e9636bedbd823ed5cb46f89ad.zip |
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>
Diffstat (limited to 'flashchips.c')
-rw-r--r-- | flashchips.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/flashchips.c b/flashchips.c index d789904d3..b6296c586 100644 --- a/flashchips.c +++ b/flashchips.c @@ -8885,6 +8885,29 @@ const struct flashchip flashchips[] = { .read = read_memmapped, .voltage = {3000, 3600}, /* Also has 12V fast program */ }, + + { + .vendor = "Unknown", + .name = "SFDP-capable chip", + .bustype = BUS_SPI, + .manufacture_id = GENERIC_MANUF_ID, + .model_id = SFDP_DEVICE_ID, + /* We present our own "report this" text hence we do not + * want the default "This flash part has status UNTESTED..." + * text to be printed. */ + .tested = TEST_OK_PREW, + .probe = probe_spi_sfdp, + .unlock = spi_disable_blockprotect, /* is this safe? */ + .read = spi_chip_read, + /* FIXME: some vendor extensions define this */ + .voltage = {}, + /* Everything below will be set by the probing function. */ + .write = NULL, + .total_size = 0, + .page_size = 0, + .feature_bits = 0, + .block_erasers = {}, + }, { .vendor = "Programmer", |