summaryrefslogtreecommitdiff
path: root/chipdrivers.h
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-06-28 21:28:27 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-06-28 21:28:27 +0000
commitc7ac169b8ae97f58b87a721e94c447d3aab43931 (patch)
treef0520da2262238adda4fb28a94fda700722c5bf4 /chipdrivers.h
parent4aec1ce53fa7643f812fcef92483480a8a8a0562 (diff)
downloadflashrom-c7ac169b8ae97f58b87a721e94c447d3aab43931.tar.gz
Introduce additional SPI status register helpers.
- spi_prettyprint_status_register_default_welwip(): It just prettyprints the plain hex value and the welwip bits. - spi_prettyprint_status_register_default_bp4(): Prints the hex value, welwip, bp0-5 and srwd bits. - spi_disable_blockprotect_bp2_srwd(), - spi_disable_blockprotect_bp3_srwd() and spi_disable_blockprotect_bp4_srwd(): Three new common block unprotection functions for the frequent cases where there is a status register lock bit at bit #7 and some block protection bits at bits #2-#4, #2-#5 and #2-#6 respectively. 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@1681 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'chipdrivers.h')
-rw-r--r--chipdrivers.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/chipdrivers.h b/chipdrivers.h
index fd522a6..573dcc2 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -63,10 +63,15 @@ int spi_write_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start,
uint8_t spi_read_status_register(struct flashctx *flash);
int spi_write_status_register(struct flashctx *flash, int status);
int spi_prettyprint_status_register_plain(struct flashctx *flash);
+int spi_prettyprint_status_register_default_welwip(struct flashctx *flash);
int spi_prettyprint_status_register_default_bp1(struct flashctx *flash);
int spi_prettyprint_status_register_default_bp2(struct flashctx *flash);
int spi_prettyprint_status_register_default_bp3(struct flashctx *flash);
+int spi_prettyprint_status_register_default_bp4(struct flashctx *flash);
int spi_disable_blockprotect(struct flashctx *flash);
+int spi_disable_blockprotect_bp2_srwd(struct flashctx *flash);
+int spi_disable_blockprotect_bp3_srwd(struct flashctx *flash);
+int spi_disable_blockprotect_bp4_srwd(struct flashctx *flash);
int spi_prettyprint_status_register_amic_a25l032(struct flashctx *flash);
int spi_prettyprint_status_register_at25df(struct flashctx *flash);
int spi_prettyprint_status_register_at25df_sec(struct flashctx *flash);
@@ -82,7 +87,6 @@ int spi_disable_blockprotect_at2x_global_unprotect_sec(struct flashctx *flash);
int spi_disable_blockprotect_at25f(struct flashctx *flash);
int spi_disable_blockprotect_at25f512a(struct flashctx *flash);
int spi_disable_blockprotect_at25f512b(struct flashctx *flash);
-int spi_disable_blockprotect_at25f4096(struct flashctx *flash);
int spi_disable_blockprotect_at25fs010(struct flashctx *flash);
int spi_disable_blockprotect_at25fs040(struct flashctx *flash);
int spi_prettyprint_status_register_s33(struct flashctx *flash);