summaryrefslogtreecommitdiff
path: root/board/snow/board.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-08-01 09:36:31 -0700
committerChromeBot <chrome-bot@google.com>2013-08-05 19:16:25 -0700
commitb91e63b0f9b01b0674deac7eb3d53937fa4e8ec6 (patch)
treec94da7bc0e55e482bca509c14d78ba6355d355c9 /board/snow/board.h
parentae3d91fce70be5f2a0d5ac09356bd22c533e1089 (diff)
downloadchrome-ec-b91e63b0f9b01b0674deac7eb3d53937fa4e8ec6.tar.gz
Clean up SPI state machine and add state codes
The old low-level SPI protocol provided no useful information to the host about whether it was ready to receive or not. It also could get stuck waiting to receive data without setting up receive DMA, if the host did two transactions back-to-back. Add a real state machine to the SPI module. Add a range of byte codes the EC can return outside of a response frame, to indicate its current state. If the AP receives one of these codes, it can abort the transaction since it now knows the EC is unable to determine when it can send a response frame. This change is backwards-compatible with current AP firmware and kernel drivers, since those only look for the framing byte and don't care what other bytes are received in the meantime. BUG=chrome-os-partner:20257 BRANCH=none TEST=crosec test; passes at 70us. Change-Id: Ia06109ead3fbc421848e01050f7baf753cbeb16c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/64254 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'board/snow/board.h')
0 files changed, 0 insertions, 0 deletions