diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-08-01 09:36:31 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-08-05 19:16:25 -0700 |
commit | b91e63b0f9b01b0674deac7eb3d53937fa4e8ec6 (patch) | |
tree | c94da7bc0e55e482bca509c14d78ba6355d355c9 /board/snow/board.h | |
parent | ae3d91fce70be5f2a0d5ac09356bd22c533e1089 (diff) | |
download | chrome-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