aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2022-11-21 18:00:42 +1100
committerFelix Singer <felixsinger@posteo.net>2022-11-23 06:18:21 +0000
commit487d0408ff500cb7aa25e4cf3a8d1ac9a1128d67 (patch)
tree3dc89eba8adfb02850fdf1c088cca3daf73f124e /include
parent7c976e34631ca4ee6345bd109a3d5ae32e9c7246 (diff)
downloadflashrom-487d0408ff500cb7aa25e4cf3a8d1ac9a1128d67.tar.gz
flashrom-487d0408ff500cb7aa25e4cf3a8d1ac9a1128d67.tar.bz2
flashrom-487d0408ff500cb7aa25e4cf3a8d1ac9a1128d67.zip
tree/: Convert flashchips db to use indirection for unlock
This paves the way to allow for the conversion of flashchip unlock func ptr to enumerate values. This change should be a NOP. TEST=`diff -u <(objdump -D flashchips.o_bk) <(objdump -D flashchips.o)`. Change-Id: I3ed51142cd22becc8286959f5504565158fa2de0 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/69843 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'include')
-rw-r--r--include/flash.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/flash.h b/include/flash.h
index b4b56fe0..3271bed2 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -322,6 +322,32 @@ enum block_erase_func {
TEST_ERASE_INJECTOR, /* special case must come last. */
};
+#define NO_BLOCKPROTECT_FUNC NULL
+#define SPI_DISABLE_BLOCKPROTECT spi_disable_blockprotect
+#define SPI_DISABLE_BLOCKPROTECT_BP2_EP_SRWD spi_disable_blockprotect_bp2_ep_srwd
+#define SPI_DISABLE_BLOCKPROTECT_BP1_SRWD spi_disable_blockprotect_bp1_srwd
+#define SPI_DISABLE_BLOCKPROTECT_BP2_SRWD spi_disable_blockprotect_bp2_srwd
+#define SPI_DISABLE_BLOCKPROTECT_BP3_SRWD spi_disable_blockprotect_bp3_srwd
+#define SPI_DISABLE_BLOCKPROTECT_BP4_SRWD spi_disable_blockprotect_bp4_srwd
+#define SPI_DISABLE_BLOCKPROTECT_AT45DB spi_disable_blockprotect_at45db
+#define SPI_DISABLE_BLOCKPROTECT_AT25F spi_disable_blockprotect_at25f
+#define SPI_DISABLE_BLOCKPROTECT_AT25FS010 spi_disable_blockprotect_at25fs010
+#define SPI_DISABLE_BLOCKPROTECT_AT25FS040 spi_disable_blockprotect_at25fs040
+#define SPI_DISABLE_BLOCKPROTECT_AT25F512A spi_disable_blockprotect_at25f512a
+#define SPI_DISABLE_BLOCKPROTECT_AT25F512B spi_disable_blockprotect_at25f512b
+#define SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT spi_disable_blockprotect_at2x_global_unprotect
+#define SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT_SEC spi_disable_blockprotect_at2x_global_unprotect_sec
+#define SPI_DISABLE_BLOCKPROTECT_SST26_GLOBAL_UNPROTECT spi_disable_blockprotect_sst26_global_unprotect
+#define SPI_DISABLE_BLOCKPROTECT_N25Q spi_disable_blockprotect_n25q
+#define UNLOCK_REGSPACE2_BLOCK_ERASER_0 unlock_regspace2_block_eraser_0
+#define UNLOCK_REGSPACE2_BLOCK_ERASER_1 unlock_regspace2_block_eraser_1
+#define UNLOCK_REGSPACE2_UNIFORM_32K unlock_regspace2_uniform_32k
+#define UNLOCK_REGSPACE2_UNIFORM_64K unlock_regspace2_uniform_64k
+#define UNLOCK_28F004S5 unlock_28f004s5
+#define UNLOCK_LH28F008BJT unlock_lh28f008bjt
+#define UNLOCK_SST_FWHUB unlock_sst_fwhub
+#define UNPROTECT_28SF040 unprotect_28sf040
+
struct flashchip {
const char *vendor;
const char *name;