diff options
author | Jeffy Chen <jeffy.chen@rock-chips.com> | 2017-03-03 18:24:02 +0800 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2017-04-05 20:28:39 +0200 |
commit | f9a40ea28f1c856289cd4adf04224fad096b4a4d (patch) | |
tree | f3527348dca641c7933d0a5596e65eb0ac240b9e /src | |
parent | 3255839be15bcccde652891354e91965733f8a86 (diff) | |
download | coreboot-f9a40ea28f1c856289cd4adf04224fad096b4a4d.tar.xz |
drivers/spi/tpm: try to wake cr50 if it is asleep
BUG=b:35775002
TEST=boot from bob
Change-Id: I6324f3c02da55a8527f085ba463cbb1f4fb5dc2e
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/452283
Commit-Ready: Caesar Wang <wxt@rock-chips.com>
Tested-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/19112
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/spi/tpm/tpm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c index fd924f4246..29b85c4716 100644 --- a/src/drivers/spi/tpm/tpm.c +++ b/src/drivers/spi/tpm/tpm.c @@ -121,6 +121,12 @@ static int start_transaction(int read_write, size_t bytes, unsigned addr) */ mdelay(10); + /* Try to wake cr50 if it is asleep. */ + tpm_if.cs_assert(&tpm_if.slave); + udelay(1); + tpm_if.cs_deassert(&tpm_if.slave); + udelay(100); + /* * The first byte of the frame header encodes the transaction type * (read or write) and transfer size (set to lentgh - 1), limited to |