rollback: Remove unused rollback_lock function
Use of the rollback_lock function was removed in
BRANCH=none
TEST=make buildall -j
@@ -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
