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>
This commit is contained in:
Vadim Bendebury
2013-06-20 13:23:38 -07:00
committed by ChromeBot
parent e493e7a013
commit ddcecbe089

View File

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