1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

writeprotect_ranges.c: add more range functions

Not all chips follow the same pattern. There are differences in how CMP
bit is treated or in block size used.

Change-Id: Ied7b27be2ee2426af8f473432e2b01a290de2365
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66212
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Sergii Dmytruk
2022-07-25 00:23:25 +03:00
committed by Anastasia Klimchuk
parent 125a328b4d
commit 994de3ae94
4 changed files with 73 additions and 12 deletions

View File

@ -211,6 +211,9 @@ static decode_range_func_t *lookup_decode_range_func_ptr(const struct flashchip
{
switch (chip->decode_range) {
case DECODE_RANGE_SPI25: return &decode_range_spi25;
case DECODE_RANGE_SPI25_64K_BLOCK: return &decode_range_spi25_64k_block;
case DECODE_RANGE_SPI25_BIT_CMP: return &decode_range_spi25_bit_cmp;
case DECODE_RANGE_SPI25_2X_BLOCK: return &decode_range_spi25_2x_block;
/* default: total function, 0 indicates no decode range function set. */
case NO_DECODE_RANGE_FUNC: return NULL;
};