summaryrefslogtreecommitdiffstats
path: root/chipdrivers.h
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-06-28 21:28:27 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-06-28 21:28:27 +0000
commit278ba6e96766f1d17202642a720f4e4eac007c74 (patch)
treef0520da2262238adda4fb28a94fda700722c5bf4 /chipdrivers.h
parent682122bce7714e285d196be09d4c97666458c487 (diff)
downloadast2050-flashrom-278ba6e96766f1d17202642a720f4e4eac007c74.zip
ast2050-flashrom-278ba6e96766f1d17202642a720f4e4eac007c74.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. Corresponding to flashrom svn r1681. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
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);
OpenPOWER on IntegriCloud