summaryrefslogtreecommitdiffstats
path: root/flashchips.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-05-26 00:36:24 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-05-26 00:36:24 +0000
commit6455dff07b06e3b870f75e88652e0501810bd104 (patch)
tree0ec4cf1c51ffbd549717d6c030422e37cddddca7 /flashchips.c
parentffb0cf649c1c66c85441314434cd1cd57f89fe02 (diff)
downloadast2050-flashrom-6455dff07b06e3b870f75e88652e0501810bd104.zip
ast2050-flashrom-6455dff07b06e3b870f75e88652e0501810bd104.tar.gz
Add two new states to enum test_state and use it for flashchips
The new enum test_state looks like this: enum test_state { OK = 0, NT = 1, /* Not tested */ BAD, /* Known to not work */ DEP, /* Support depends on configuration (e.g. Intel flash descriptor) */ NA, /* Not applicable (e.g. write support on ROM chips) */ }; The second new state 'NA' is introduced, among other things, to indicate the erase and write states of real ROMs correctly. This is also implemented by this patch and required to exchange the previous bit mask in struct flashchip with a new struct containing an enum test_state for each operation. The -L output is changed accordingly to print '-' in the case of an N/A state and the wiki output uses a new template producing a greyed out cell. Previous users of enum test_state are not affected by this change (yet). Corresponding to flashrom svn r1798. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/flashchips.c b/flashchips.c
index dee7d9e..027b996 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -2189,7 +2189,7 @@ const struct flashchip flashchips[] = {
.model_id = ATMEL_AT26F004,
.total_size = 512,
.page_size = 256,
- .tested = TEST_BAD_WRITE,
+ .tested = {.probe = NT, .read = NT, .erase = NT, .write = BAD },
.feature_bits = FEATURE_WRSR_WREN,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
@@ -5915,7 +5915,7 @@ const struct flashchip flashchips[] = {
.model_id = MACRONIX_MX23L3254,
.total_size = 4096,
.page_size = 256,
- .tested = TEST_OK_PR | TEST_BAD_EW,
+ .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
.write = NULL, /* MX23L3254 is a mask ROM, so it is read-only */
OpenPOWER on IntegriCloud