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 <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/181090
Reviewed-by: Yung-chieh Lo <yjlou@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Vic (Chun-Ju) Yang
2013-12-23 11:10:31 +08:00
committed by chrome-internal-fetch
parent a0cb64374a
commit 143763421c

View File

@@ -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);