diff options
author | Bill Richardson <wfrichar@chromium.org> | 2015-08-14 15:24:28 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-08-15 01:32:39 +0000 |
commit | 5a4ae0c3cd8d88767fce95c21c28b0ba97817b83 (patch) | |
tree | 340b2ca26b07af904eb3f70f8cc983f9cc706779 | |
parent | 4e355700aa97adff9b3c848660511cbe825dc4b3 (diff) | |
download | chrome-ec-5a4ae0c3cd8d88767fce95c21c28b0ba97817b83.tar.gz |
Cr50: Fix spshc console command
The SPS RX FIFO handler prototype changed from passing cs_enabled
to cs_disabled, but the callback function for the spshc command didn't.
Now it does.
The spshc command switches the protocol on the SPI Slave bus to
expect EC Host Commands.
BUG=none
BRANCH=none
TEST=manual
At the EC console:
spstpm off
spshc
On the build machine, with an FTDI cable connected to the SPS
input:
cd extra/ftdi_hostcmd
make
./test_cmds
Change-Id: I69294a977b83854c5f6348904330bf74416cc6ec
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/293619
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r-- | chip/g/sps_hc.c | 4 | ||||
-rw-r--r-- | extra/ftdi_hostcmd/test_cmds.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/chip/g/sps_hc.c b/chip/g/sps_hc.c index 5ddad59d34..1fe9c6f62a 100644 --- a/chip/g/sps_hc.c +++ b/chip/g/sps_hc.c @@ -124,13 +124,13 @@ static int req_header_looks_good(const struct ec_host_request *req) } /* RX FIFO handler (runs in interrupt context) */ -static void hc_rx_handler(uint8_t *data, size_t data_size, int cs_enabled) +static void hc_rx_handler(uint8_t *data, size_t data_size, int cs_disabled) { struct ec_host_request *req = (struct ec_host_request *)rxbuf; static struct host_packet rx_packet; size_t i; - if (!cs_enabled) { + if (cs_disabled) { if (state == SPI_STATE_PROCESSING) { /* * A task is preparing a response, but the master has diff --git a/extra/ftdi_hostcmd/test_cmds.c b/extra/ftdi_hostcmd/test_cmds.c index f7f06de453..dc09c2b3cb 100644 --- a/extra/ftdi_hostcmd/test_cmds.c +++ b/extra/ftdi_hostcmd/test_cmds.c @@ -602,7 +602,7 @@ int main(int argc, char *argv[]) stop = (uint16_t)strtoul(argv[optind++], 0, 0); /* Find something to talk to */ - mpsse = MPSSE(SPI0, 2000000, 0); + mpsse = MPSSE(SPI0, 1000000, 0); if (!mpsse) { printf("Can't find a device to open\n"); return 1; |