summaryrefslogtreecommitdiff
path: root/flashchips.c
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-05-26 00:36:24 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-05-26 00:36:24 +0000
commitcfc7fc504858b4d32b6c0445e9ab94a676bfa970 (patch)
tree0ec4cf1c51ffbd549717d6c030422e37cddddca7 /flashchips.c
parentbc1ea784b1da3d35c2cbb22d07724c74f4aca386 (diff)
downloadflashrom-cfc7fc504858b4d32b6c0445e9ab94a676bfa970.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). Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1798 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
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 */