aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNikolai Artemiev <nartemiev@google.com>2022-11-21 18:55:39 +1100
committerFelix Singer <felixsinger@posteo.net>2022-11-23 06:18:51 +0000
commit8d0816faa55c2d52f92dcf4758935a807f71e4ba (patch)
treea91531cf8a90a638e7761a9138d0b0d32a831267 /include
parent487d0408ff500cb7aa25e4cf3a8d1ac9a1128d67 (diff)
downloadflashrom-8d0816faa55c2d52f92dcf4758935a807f71e4ba.tar.gz
flashrom-8d0816faa55c2d52f92dcf4758935a807f71e4ba.tar.bz2
flashrom-8d0816faa55c2d52f92dcf4758935a807f71e4ba.zip
tree/: Convert flashchips db to use indirection for printlock
This paves the way to allow for the conversion of flashchip printlock 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: Icff868d9454e9b0a059a736457bb562430436033 Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/69844 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'include')
-rw-r--r--include/flash.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/flash.h b/include/flash.h
index 3271bed2..3f78721b 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -348,6 +348,50 @@ enum block_erase_func {
#define UNLOCK_SST_FWHUB unlock_sst_fwhub
#define UNPROTECT_28SF040 unprotect_28sf040
+#define NO_PRINTLOCK_FUNC NULL
+#define PRINTLOCK_AT49F printlock_at49f
+#define PRINTLOCK_REGSPACE2_BLOCK_ERASER_0 printlock_regspace2_block_eraser_0
+#define PRINTLOCK_REGSPACE2_BLOCK_ERASER_1 printlock_regspace2_block_eraser_1
+#define PRINTLOCK_SST_FWHUB printlock_sst_fwhub
+#define PRINTLOCK_W39F010 printlock_w39f010
+#define PRINTLOCK_W39L010 printlock_w39l010
+#define PRINTLOCK_W39L020 printlock_w39l020
+#define PRINTLOCK_W39L040 printlock_w39l040
+#define PRINTLOCK_W39V040A printlock_w39v040a
+#define PRINTLOCK_W39V040B printlock_w39v040b
+#define PRINTLOCK_W39V040C printlock_w39v040c
+#define PRINTLOCK_W39V040FA printlock_w39v040fa
+#define PRINTLOCK_W39V040FB printlock_w39v040fb
+#define PRINTLOCK_W39V040FC printlock_w39v040fc
+#define PRINTLOCK_W39V080A printlock_w39v080a
+#define PRINTLOCK_W39V080FA printlock_w39v080fa
+#define PRINTLOCK_W39V080FA_DUAL printlock_w39v080fa_dual
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AMIC_A25L032 spi_prettyprint_status_register_amic_a25l032
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF spi_prettyprint_status_register_at25df
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF_SEC spi_prettyprint_status_register_at25df_sec
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT25F spi_prettyprint_status_register_at25f
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT25F4096 spi_prettyprint_status_register_at25f4096
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT25F512A spi_prettyprint_status_register_at25f512a
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT25F512B spi_prettyprint_status_register_at25f512b
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT25FS010 spi_prettyprint_status_register_at25fs010
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT25FS040 spi_prettyprint_status_register_at25fs040
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT26DF081A spi_prettyprint_status_register_at26df081a
+#define SPI_PRETTYPRINT_STATUS_REGISTER_AT45DB spi_prettyprint_status_register_at45db
+#define SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD spi_prettyprint_status_register_bp1_srwd
+#define SPI_PRETTYPRINT_STATUS_REGISTER_BP2_BPL spi_prettyprint_status_register_bp2_bpl
+#define SPI_PRETTYPRINT_STATUS_REGISTER_BP2_EP_SRWD spi_prettyprint_status_register_bp2_ep_srwd
+#define SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD spi_prettyprint_status_register_bp2_srwd
+#define SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL spi_prettyprint_status_register_bp2_tb_bpl
+#define SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD spi_prettyprint_status_register_bp3_srwd
+#define SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD spi_prettyprint_status_register_bp4_srwd
+#define SPI_PRETTYPRINT_STATUS_REGISTER_DEFAULT_WELWIP spi_prettyprint_status_register_default_welwip
+#define SPI_PRETTYPRINT_STATUS_REGISTER_EN25S_WP spi_prettyprint_status_register_en25s_wp
+#define SPI_PRETTYPRINT_STATUS_REGISTER_N25Q spi_prettyprint_status_register_n25q
+#define SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN spi_prettyprint_status_register_plain
+#define SPI_PRETTYPRINT_STATUS_REGISTER_SST25 spi_prettyprint_status_register_sst25
+#define SPI_PRETTYPRINT_STATUS_REGISTER_SST25VF016 spi_prettyprint_status_register_sst25vf016
+#define SPI_PRETTYPRINT_STATUS_REGISTER_SST25VF040B spi_prettyprint_status_register_sst25vf040b
+
struct flashchip {
const char *vendor;
const char *name;