summaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-11-10 22:54:13 +0100
committerNico Huber <nico.h@gmx.de>2018-01-02 20:15:35 +0000
commitaac81424ebb8234b54cbab8fe47350b562b84fae (patch)
tree2806be52075a5a3a46c5e7be2ccdb6d69b6e1a0f /flash.h
parentfe34d2af28bd81aaa1e23ba38febaa98ec4bb90c (diff)
downloadflashrom-aac81424ebb8234b54cbab8fe47350b562b84fae.tar.gz
flashrom-aac81424ebb8234b54cbab8fe47350b562b84fae.tar.bz2
flashrom-aac81424ebb8234b54cbab8fe47350b562b84fae.zip
flashchips: Revise all 4BA chips
Advertise all 4BA features that are currently supported by flashrom, plus add a new feature flag for the 4BA fast-read instruction. Also, list all supported 3BA and 4BA erase-block functions. As this adds a lot of new code paths that could be taken for these chips, mark them all as untested again. Change-Id: I0598496ee7058e3b170684d366f58e4014e0e871 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22423 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/flash.h b/flash.h
index 6e86c3545..d31b25683 100644
--- a/flash.h
+++ b/flash.h
@@ -98,9 +98,9 @@ enum write_granularity {
/*
* How many different erase functions do we have per chip?
- * Atmel AT25FS010 has 6 different functions.
+ * Macronix MX25L25635F has 8 different functions.
*/
-#define NUM_ERASEFUNCTIONS 6
+#define NUM_ERASEFUNCTIONS 8
/* Feature bits used for non-SPI only */
#define FEATURE_REGISTERMAP (1 << 0)
@@ -124,7 +124,12 @@ enum write_granularity {
#define FEATURE_4BA_EXT_ADDR (1 << 12) /**< Regular 3-byte operations can be used by writing the most
significant address byte into an extended address register. */
#define FEATURE_4BA_READ (1 << 13) /**< Native 4BA read instruction (0x13) is supported. */
-#define FEATURE_4BA_WRITE (1 << 14) /**< Native 4BA byte program (0x12) is supported. */
+#define FEATURE_4BA_FAST_READ (1 << 14) /**< Native 4BA fast read instruction (0x0c) is supported. */
+#define FEATURE_4BA_WRITE (1 << 15) /**< Native 4BA byte program (0x12) is supported. */
+/* 4BA Shorthands */
+#define FEATURE_4BA_NATIVE (FEATURE_4BA_READ | FEATURE_4BA_FAST_READ | FEATURE_4BA_WRITE)
+#define FEATURE_4BA (FEATURE_4BA_ENTER | FEATURE_4BA_EXT_ADDR | FEATURE_4BA_NATIVE)
+#define FEATURE_4BA_WREN (FEATURE_4BA_ENTER_WREN | FEATURE_4BA_EXT_ADDR | FEATURE_4BA_NATIVE)
enum test_state {
OK = 0,