[coreboot-gerrit] Change in coreboot[master]: drivers/spi/tpm: try to wake cr50 if it is asleep

Furquan Shaikh (Code Review) gerrit at coreboot.org
Wed Apr 5 20:28:48 CEST 2017


Furquan Shaikh has submitted this change and it was merged. ( https://review.coreboot.org/19112 )

Change subject: drivers/spi/tpm: try to wake cr50 if it is asleep
......................................................................


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 at rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/452283
Commit-Ready: Caesar Wang <wxt at rock-chips.com>
Tested-by: Caesar Wang <wxt at rock-chips.com>
Reviewed-by: Julius Werner <jwerner at chromium.org>
Reviewed-on: https://review.coreboot.org/19112
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
Tested-by: build bot (Jenkins)
---
M src/drivers/spi/tpm/tpm.c
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Aaron Durbin: Looks good to me, approved
  build bot (Jenkins): Verified



diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c
index fd924f4..29b85c4 100644
--- a/src/drivers/spi/tpm/tpm.c
+++ b/src/drivers/spi/tpm/tpm.c
@@ -121,6 +121,12 @@
 	 */
 	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

-- 
To view, visit https://review.coreboot.org/19112
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6324f3c02da55a8527f085ba463cbb1f4fb5dc2e
Gerrit-PatchSet: 3
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)



More information about the coreboot-gerrit mailing list