summaryrefslogtreecommitdiff
path: root/spi25_statusreg.c
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-06-28 21:29:08 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-06-28 21:29:08 +0000
commit13ea468946b5036ff62d81bff5895f1b4346ba74 (patch)
treef381998972806961af753464911f93de9fd3ee47 /spi25_statusreg.c
parente3879c53a909ffa7d1cc624b0c053e15466819d6 (diff)
downloadflashrom-13ea468946b5036ff62d81bff5895f1b4346ba74.tar.gz
Add support for Eon EN25S series.
Add... - EN25S10 - EN25S20 - EN25S40 - EN25S80 - EN25S16 - EN25S32 - EN25S64 Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com> Reviewed-by: Steven Zakulec <spzakulec@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1687 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'spi25_statusreg.c')
-rw-r--r--spi25_statusreg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/spi25_statusreg.c b/spi25_statusreg.c
index 5560f5b..6b4e516 100644
--- a/spi25_statusreg.c
+++ b/spi25_statusreg.c
@@ -591,6 +591,20 @@ int spi_disable_blockprotect_at25fs040(struct flashctx *flash)
return spi_disable_blockprotect_generic(flash, 0x7C, 1 << 7, 0, 0xFF);
}
+/* === Eon === */
+
+int spi_prettyprint_status_register_en25s_wp(struct flashctx *flash)
+{
+ uint8_t status = spi_read_status_register(flash);
+ spi_prettyprint_status_register_hex(status);
+
+ spi_prettyprint_status_register_srwd(status);
+ msg_cdbg("Chip status register: WP# disable (WPDIS) is %sabled\n", (status & (1 << 6)) ? "en " : "dis");
+ spi_prettyprint_status_register_bp(status, 3);
+ spi_prettyprint_status_register_welwip(status);
+ return 0;
+}
+
/* === Intel === */
/* TODO: Clear P_FAIL and E_FAIL with Clear SR Fail Flags Command (30h) here? */