diff options
-rw-r--r-- | chip/lm4/mock_flash.c | 9 | ||||
-rw-r--r-- | common/flash_common.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/chip/lm4/mock_flash.c b/chip/lm4/mock_flash.c index 8e46d52bfc..de9b278044 100644 --- a/chip/lm4/mock_flash.c +++ b/chip/lm4/mock_flash.c @@ -57,8 +57,13 @@ int flash_physical_get_protect(int block) return mock_protect[block]; } +void flash_physical_set_protect(int start_bank, int bank_count) +{ + for (; bank_count > 0; bank_count--) + mock_protect[start_bank++] = 1; +} -void flash_physical_set_protect(int block) +int flash_physical_pre_init(void) { - mock_protect[block] = 1; + return EC_SUCCESS; } diff --git a/common/flash_common.c b/common/flash_common.c index bfd50edac5..c496560ca1 100644 --- a/common/flash_common.c +++ b/common/flash_common.c @@ -47,7 +47,7 @@ static struct persist_state pstate; /* RAM copy of pstate data */ /* Return non-zero if the write protect pin is asserted */ static int wp_pin_asserted(void) { -#ifdef BOARD_link +#if defined(BOARD_link) && defined(CONFIG_TASK_POWERBTN) return write_protect_asserted(); #elif defined(CHIP_VARIANT_stm32f100) /* Fake write protect pin */ |