From 143763421c4f85a6d7e60bee0f7330dac6f2aeba Mon Sep 17 00:00:00 2001 From: "Vic (Chun-Ju) Yang" Date: Mon, 23 Dec 2013 11:10:31 +0800 Subject: [PATCH] Ignore all-now flag if WP GPIO is deasserted On early snow boards, WP GPIO is not wired to the EC. Now that we have properly fixed hardware, we should drop workaround for those boards. BUG=chrome-os-partner:23762 TEST=Build all boards BRANCH=None Change-Id: I5dcfaf5497fc36d6b8d7bc5d8975aa18b2d36a1d Signed-off-by: Vic (Chun-Ju) Yang Reviewed-on: https://chromium-review.googlesource.com/181090 Reviewed-by: Yung-chieh Lo Reviewed-by: Randall Spangler Reviewed-by: Vincent Palatin --- common/flash.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/common/flash.c b/common/flash.c index d39729980b..ccb0827806 100644 --- a/common/flash.c +++ b/common/flash.c @@ -626,16 +626,6 @@ static int flash_command_protect(struct host_cmd_handler_args *args) if (!(r->flags & EC_FLASH_PROTECT_RO_NOW)) r->writable_flags |= EC_FLASH_PROTECT_RO_AT_BOOT; -#ifdef CHIP_FAMILY_STM32F - /* - * TODO(crosbug.com/p/23762): Should ignore all-now on STM32F if WP - * isn't asserted. We don't do this due to limitations in early snow - * boards (lack of WP GPIO?) - in which case, this can either be - * restricted to BOARD_SNOW, or removed entirely. - */ - r->valid_flags |= EC_FLASH_PROTECT_ALL_NOW; - r->writable_flags |= EC_FLASH_PROTECT_ALL_NOW; -#else /* * If entire flash isn't protected at this boot, it can be enabled if * the WP GPIO is asserted. @@ -643,7 +633,6 @@ static int flash_command_protect(struct host_cmd_handler_args *args) if (!(r->flags & EC_FLASH_PROTECT_ALL_NOW) && (r->flags & EC_FLASH_PROTECT_GPIO_ASSERTED)) r->writable_flags |= EC_FLASH_PROTECT_ALL_NOW; -#endif args->response_size = sizeof(*r);