diff options
author | Randall Spangler <rspangler@chromium.org> | 2014-02-27 20:26:08 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-03-18 02:05:47 (GMT) |
commit | e8c12662364fbcf5ea917d341f707534c8574900 (patch) | |
tree | 92b10bee92329f51223785449ba781c9cdbaee74 /drivers/misc/cros_ec_spi.c | |
parent | 836bb6e8277aaa8f0f86e39b0c38b207d32723d9 (diff) | |
download | u-boot-fsl-qoriq-e8c12662364fbcf5ea917d341f707534c8574900.tar.xz |
cros_ec: Clean up multiple EC protocol support
Version 1 protocols (without command version) were already no longer
supported in cros_ec.c. This removes some dead code from the
cros_ec_i2c driver.
Version 2 protcols (with command version) are now called
protocol_version=2, instead of cmd_version_is_supported=1.
A subsequent change will introduce protocol version 3 for SPI.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc/cros_ec_spi.c')
-rw-r--r-- | drivers/misc/cros_ec_spi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/cros_ec_spi.c b/drivers/misc/cros_ec_spi.c index 2fc9110..ef73782 100644 --- a/drivers/misc/cros_ec_spi.c +++ b/drivers/misc/cros_ec_spi.c @@ -42,6 +42,12 @@ int cros_ec_spi_command(struct cros_ec_dev *dev, uint8_t cmd, int cmd_version, int csum, len; int rv; + if (dev->protocol_version != 2) { + debug("%s: Unsupported EC protcol version %d\n", + __func__, dev->protocol_version); + return -1; + } + /* * Sanity-check input size to make sure it plus transaction overhead * fits in the internal device buffer. |