summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2013-06-20 13:23:38 -0700
committerChromeBot <chrome-bot@google.com>2013-06-20 16:47:07 -0700
commitddcecbe0893ae40a0fe2c27ed7a7cfe0f5bdce12 (patch)
tree96c64bd308a9bb98d95f80894c029a7e3b9c178c
parente493e7a01333fb0894cbcbc41cd1ec70906a2081 (diff)
downloadchrome-ec-ddcecbe0893ae40a0fe2c27ed7a7cfe0f5bdce12.tar.gz
drop: Ignore command version for FLASH_PROTECT command
The ec driver does not yet pass the command version properly from app to the EC. This causes a failure when trying to read flashrom write protect status (command 0x15). The thing is that the command version is not even important for this command, as it was never implemented differently. As a quick fix - mark the command descriptor as supporting both versions. BRANCH=none BUG=chromium:239197 TEST=manual . on peach_pit (with fixed flashrom, coming under a separate fix): # flashrom -p ec --wp-status flashrom v0.9.4 : : on Linux 3.8.11 (armv7l), built with libpci 3.1.10, GCC 4.7.x-google 20130114 (prerelease), little endian WP: status: 0x00 WP: status.srp0: 0 WP: write protect is disabled. WP: write protect range: start=0x00000000, len=0x00000000 # Change-Id: I8302457cc2afdfe3bdcb50cfa2bea29969d0c107 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/59462 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--common/flash_common.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/flash_common.c b/common/flash_common.c
index 2192fa2e07..30221c288d 100644
--- a/common/flash_common.c
+++ b/common/flash_common.c
@@ -599,9 +599,15 @@ static int flash_command_protect(struct host_cmd_handler_args *args)
return EC_RES_SUCCESS;
}
+
+/*
+ * TODO(crbug.com/239197) : Adding both versions to the version mask is a
+ * temporary workaround for a problem in the cros_ec driver. Drop
+ * EC_VER_MASK(0) once cros_ec driver can send the correct version.
+ */
DECLARE_HOST_COMMAND(EC_CMD_FLASH_PROTECT,
flash_command_protect,
- EC_VER_MASK(1));
+ EC_VER_MASK(0) | EC_VER_MASK(1));
static int flash_command_region_info(struct host_cmd_handler_args *args)
{