aboutsummaryrefslogtreecommitdiff
path: root/util/flashrom/flash.h
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2008-05-03 04:34:37 +0000
committerPeter Stuge <peter@stuge.se>2008-05-03 04:34:37 +0000
commit4934fc03cbbf1373d30c08fa9b7d68144eec4ece (patch)
tree09c33c096154b073d1c639b03f51670aa4af1f99 /util/flashrom/flash.h
parenta9a5f49d8f69ed131f902f04f651ac96bd6f80cc (diff)
flashrom: Add a tested bitmap field to the flash chip table.
Two bits indicate OK and BAD for each operation PROBE READ ERASE WRITE. 8 bits out of 32 are in use now. No bits set means nothing has been tested. For chips with at least one operation that is not tested or not working, the user is asked to email a report to a special email adress so that the table can be updated. All chips are TEST_UNTESTED for now. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3277 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flash.h')
-rw-r--r--util/flashrom/flash.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/util/flashrom/flash.h b/util/flashrom/flash.h
index 3c072107e4..58c650b9da 100644
--- a/util/flashrom/flash.h
+++ b/util/flashrom/flash.h
@@ -45,6 +45,11 @@ struct flashchip {
int total_size;
int page_size;
+ /* Indicate if flashrom has been tested with this flash chip and if
+ * everything worked correctly.
+ */
+ uint32_t tested;
+
int (*probe) (struct flashchip *flash);
int (*erase) (struct flashchip *flash);
int (*write) (struct flashchip *flash, uint8_t *buf);
@@ -55,6 +60,20 @@ struct flashchip {
volatile uint8_t *virtual_registers;
};
+#define TEST_UNTESTED 0
+
+#define TEST_OK_PROBE (1<<0)
+#define TEST_OK_READ (1<<1)
+#define TEST_OK_ERASE (1<<2)
+#define TEST_OK_WRITE (1<<3)
+#define TEST_OK_MASK 0x0f
+
+#define TEST_BAD_PROBE (1<<4)
+#define TEST_BAD_READ (1<<5)
+#define TEST_BAD_ERASE (1<<6)
+#define TEST_BAD_WRITE (1<<7)
+#define TEST_BAD_MASK 0xf0
+
extern struct flashchip flashchips[];
/*