From a1006865e7f695ddd1c730cc9c6c6a6f109c43b9 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Tue, 21 May 2013 11:03:29 -0700 Subject: Move write protect GPIO handling to flash module Write protect signal naming is now consistent across boards. New CONFIG_WP_ACTIVE_HIGH is present on systems where the write protect signal is active-high (e.g. Link). This will be used in the next CL, which moves flash_get_protect() to flash_common.c BUG=chrome-os-partner:15613 BRANCH=none TEST=flashinfo properly reports WP signal status Change-Id: I502ab033c3eb36661cc3ee97320874b3fbf6fc0d Signed-off-by: Randall Spangler Reviewed-on: https://gerrit.chromium.org/gerrit/56087 Reviewed-by: Vic Yang --- test/flash.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/flash.c b/test/flash.c index 02144e756c..5db8a6196c 100644 --- a/test/flash.c +++ b/test/flash.c @@ -66,11 +66,9 @@ int gpio_get_level(enum gpio_signal signal) if (mock_wp == -1) mock_wp = !!(system_get_scratchpad() & TEST_STATE_BOOT_WP_ON); - if (strcasecmp(name, "WRITE_PROTECTn") == 0 || - strcasecmp(name, "WP_L") == 0) + if (strcasecmp(name, "WP_L") == 0) return !mock_wp; - if (strcasecmp(name, "WRITE_PROTECT") == 0 || - strcasecmp(name, "WP") == 0) + if (strcasecmp(name, "WP") == 0) return mock_wp; /* Signal other than write protect. Just return 0. */ -- cgit v1.2.1