summaryrefslogtreecommitdiff
path: root/chip/stm32/spi.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-08-01 09:55:58 -0700
committerChromeBot <chrome-bot@google.com>2013-08-02 13:05:56 -0700
commitc6dfa7e03b4c672e1031b4af9230b9da77e50f1a (patch)
tree63c6a1472c0d7884bb6952d828198cc86d56a035 /chip/stm32/spi.c
parent0d3bdc690e7ab3ed0ab190b0529e95c2bbba4e7e (diff)
downloadchrome-ec-c6dfa7e03b4c672e1031b4af9230b9da77e50f1a.tar.gz
Host commands don't set the response pointer
Remove support for allowing host command handlers to set the response pointer. This is just one more thing that can break (and did, on SPI protocol V2). No commands other than the trivial read-memory-map command in host_command.c and flash read made use of this capability, and the savings in performance was negligible. BUG=chrome-os-partner:21576 BRANCH=none TEST=boot pit; still boots Change-Id: I0a9bcf57dbea7155318fc389d7b47d3742a1a00a Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/64236
Diffstat (limited to 'chip/stm32/spi.c')
-rw-r--r--chip/stm32/spi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/chip/stm32/spi.c b/chip/stm32/spi.c
index bb2bfaafe6..07285e27ef 100644
--- a/chip/stm32/spi.c
+++ b/chip/stm32/spi.c
@@ -238,13 +238,9 @@ static void spi_send_response(struct host_cmd_handler_args *args)
if (!active)
return;
- if (args->response_size > EC_PROTO2_MAX_PARAM_SIZE)
+ if (args->response_size > args->response_max)
result = EC_RES_INVALID_RESPONSE;
- if ((uint8_t *)args->response >= out_msg &&
- (uint8_t *)args->response < out_msg + sizeof(out_msg))
- ASSERT(args->response == out_msg + SPI_PROTO2_OFFSET);
-
/* Transmit the reply */
txdma = dma_get_channel(STM32_DMAC_SPI1_TX);
reply(txdma, result, args->response, args->response_size);