aboutsummaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/flash.h b/flash.h
index b935e9bc..f63aa5d3 100644
--- a/flash.h
+++ b/flash.h
@@ -195,6 +195,8 @@ struct reg_bit_info {
} writability;
};
+struct wp_bits;
+
struct flashchip {
const char *vendor;
const char *name;
@@ -305,6 +307,10 @@ struct flashchip {
/* Complement bit (CMP) */
struct reg_bit_info cmp;
} reg_bits;
+
+ /* Function that takes a set of WP config bits (e.g. BP, SEC, TB, etc) */
+ /* and determines what protection range they select. */
+ void (*decode_range)(size_t *start, size_t *len, const struct wp_bits *, size_t chip_len);
};
typedef int (*chip_restore_fn_cb_t)(struct flashctx *flash, uint8_t status);