aboutsummaryrefslogtreecommitdiffstats
path: root/82802ab.c
diff options
context:
space:
mode:
Diffstat (limited to '82802ab.c')
-rw-r--r--82802ab.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/82802ab.c b/82802ab.c
index 90c9cf0d..a440bd45 100644
--- a/82802ab.c
+++ b/82802ab.c
@@ -142,7 +142,7 @@ int write_82802ab(struct flashctx *flash, const uint8_t *src, unsigned int start
return 0;
}
-int unlock_28f004s5(struct flashctx *flash)
+static int unlock_28f004s5(struct flashctx *flash)
{
chipaddr bios = flash->virtual_memory;
uint8_t mcfg, bcfg;
@@ -195,7 +195,7 @@ int unlock_28f004s5(struct flashctx *flash)
return 0;
}
-int unlock_lh28f008bjt(struct flashctx *flash)
+static int unlock_lh28f008bjt(struct flashctx *flash)
{
chipaddr bios = flash->virtual_memory;
uint8_t mcfg, bcfg;
@@ -249,3 +249,12 @@ int unlock_lh28f008bjt(struct flashctx *flash)
return 0;
}
+
+blockprotect_func_t *lookup_82802ab_blockprotect_func_ptr(const struct flashchip *const chip)
+{
+ switch (chip->unlock) {
+ case UNLOCK_28F004S5: return unlock_28f004s5;
+ case UNLOCK_LH28F008BJT: return unlock_lh28f008bjt;
+ default: return NULL; /* fallthough */
+ };
+}