summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/rollback.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/common/rollback.c b/common/rollback.c
index e62e4a09fd..ea508f2b0b 100644
--- a/common/rollback.c
+++ b/common/rollback.c
@@ -196,32 +196,6 @@ failed:
}
#endif
-int rollback_lock(void)
-{
- int ret;
-
- /* Already locked */
- if (flash_get_protect() & EC_FLASH_PROTECT_ROLLBACK_NOW)
- return EC_SUCCESS;
-
- CPRINTS("Protecting rollback");
-
- /* This may do nothing if WP is not enabled, or RO is not protected. */
- ret = flash_set_protect(EC_FLASH_PROTECT_ROLLBACK_AT_BOOT, -1);
-
- if (!(flash_get_protect() & EC_FLASH_PROTECT_ROLLBACK_NOW) &&
- flash_get_protect() & EC_FLASH_PROTECT_ROLLBACK_AT_BOOT) {
- /*
- * If flash protection is still not enabled (some chips may
- * be able to enable it immediately), reboot.
- */
- cflush();
- system_reset(SYSTEM_RESET_HARD | SYSTEM_RESET_PRESERVE_FLAGS);
- }
-
- return ret;
-}
-
#ifdef CONFIG_ROLLBACK_UPDATE
#ifdef CONFIG_ROLLBACK_SECRET_SIZE