the following patch was just integrated into master:
commit 48f708d199769d03ef1c31184955703d9d73ad80
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Mon Oct 3 12:43:14 2016 -0700
drivers/i2c/tpm/cr50: Initialize IRQ status handler before probe
Move the setup of the IRQ status handler so it will be set up properly
before the early probe happens.
BUG=chrome-os-partner:53336
Change-Id: I4380af1233d2a252899459635a3cb69ca196088d
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Reviewed-on: https://review.coreboot.org/16861
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Vadim Bendebury <vbendeb(a)chromium.org>
See https://review.coreboot.org/16861 for details.
-gerrit
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16870
-gerrit
commit 004cefe014c36b6c85854ad687e0491e19379d32
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Mon Oct 3 16:05:20 2016 -0700
soc/intel/apollolake: Disable HECI2 device reset on S3 resume
Converged Security Engine (CSE) has a secure variable storage feature.
However, this storage is expected to be reset during S3 resume flow.
Since coreboot does not use secure storage feature, disable HECI2 reset
request. This saves appr. 130ms of resume time.
BUG=chrome-os-partner:56941
BRANCH=none
TEST=powerd_dbus_suspend; resume; check time with cbmem -t. Note
FspMemoryInit time is not significantly different from normal boot
time case.
Change-Id: I485a980369c6bd97c43b9e554d65ee89e84d8233
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/soc/intel/apollolake/romstage.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c
index b9733de..6f7fe46 100644
--- a/src/soc/intel/apollolake/romstage.c
+++ b/src/soc/intel/apollolake/romstage.c
@@ -169,6 +169,15 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd)
*/
mupd->FspmConfig.SkipCseRbp =
IS_ENABLED(CONFIG_BOOT_DEVICE_MEMORY_MAPPED);
+
+ /*
+ * Converged Security Engine (CSE) has secure storage functionality.
+ * HECI2 device can be used to access that functionality. However, part
+ * of S3 resume flow involves resetting HECI2 which takes 136ms. Since
+ * coreboot does not use secure storage functionality, instruct FSP to
+ * skip HECI2 reset.
+ */
+ mupd->FspmConfig.EnableS3Heci2 = 0;
}
__attribute__ ((weak))
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16870
-gerrit
commit e20b7d1ed988ac3e911bac993df7ddfa14123a14
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Mon Oct 3 16:05:20 2016 -0700
soc/intel/apollolake: Disable HECI2 device reset on S3 resume
Converged Security Engine (CSE) has a secure variable storage feature.
However, this storage is expected to be reset during S3 resume flow.
Since coreboot does not use secure storage feature, disable HECI2 reset
request. This saves appr. 130ms of resume time.
BUG=chrome-os-partner:56941
BRANCH=none
TEST=powerd_dbus_suspend; resume; check time with cbmem -t. Note
FspMemoryInit time is not significantly different from normal boot
time case.
Change-Id: I485a980369c6bd97c43b9e554d65ee89e84d8233
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/soc/intel/apollolake/romstage.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c
index b9733de..c1e6dc8 100644
--- a/src/soc/intel/apollolake/romstage.c
+++ b/src/soc/intel/apollolake/romstage.c
@@ -169,6 +169,15 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd)
*/
mupd->FspmConfig.SkipCseRbp =
IS_ENABLED(CONFIG_BOOT_DEVICE_MEMORY_MAPPED);
+
+ /*
+ * Convered Security Engine (CSE) has secure storage functionality.
+ * HECI2 device can be used to access that functionality. However, part
+ * of S3 resume flow involves resetting HECI2 which takes 136ms. Since
+ * coreboot does not use secure storage functionality, instruct FSP to
+ * skip HECI2 reset.
+ */
+ mupd->FspmConfig.EnableS3Heci2 = 0;
}
__attribute__ ((weak))
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16885
-gerrit
commit 65692da37ff59603a2b679fc4137486a6c0a14a8
Author: Julius Werner <jwerner(a)chromium.org>
Date: Mon Oct 3 12:52:55 2016 -0700
ec/google/chromeec: Add minimum delay between SPI CS assertions
Some Chrome OS ECs require a small amount of time after a SPI
transaction to reset their controllers before they can service the next
CS assertion. The kernel and depthcharge have always enforced a 200us
minimum delay for this... coreboot should've done the same.
BRANCH=gru
BUG=chrome-os-partner:58046
TEST=Booted Kevin in recovery mode, confirmed that recovery events got
logged with correct timestamps in eventlog.
Change-Id: I32ec343f3293ac93729d3e6e2f43d7605a396cdb
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: b9e4696533d4318ae7c8715b71ab963d8897c16c
Original-Change-Id: I6a7baf7859d5d50e299495d118e7890dcaa2c1b0
Original-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/392206
Original-Tested-by: Shawn N <shawnn(a)chromium.org>
Original-Reviewed-by: Shawn N <shawnn(a)chromium.org>
---
src/ec/google/chromeec/ec_spi.c | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/src/ec/google/chromeec/ec_spi.c b/src/ec/google/chromeec/ec_spi.c
index e93d038..a0049c6 100644
--- a/src/ec/google/chromeec/ec_spi.c
+++ b/src/ec/google/chromeec/ec_spi.c
@@ -20,6 +20,11 @@
#include <spi-generic.h>
#include <timer.h>
+/* This is assuming that this driver is not used on x86. If that changes, this
+ might need to become a CAR_GLOBAL or maybe even more complicated. */
+static struct stopwatch cs_cooldown_sw;
+static const long cs_cooldown_us = 200;
+
static const uint8_t EcFramingByte = 0xec;
#define PROTO3_MAX_PACKET_SIZE 268
@@ -44,7 +49,10 @@ void *crosec_get_buffer(size_t size, int req)
static int crosec_spi_io(size_t req_size, size_t resp_size, void *context)
{
struct spi_slave *slave = (struct spi_slave *)context;
+ int ret = 0;
+ while (!stopwatch_expired(&cs_cooldown_sw))
+ /* Wait minimum delay between CS assertions. */;
spi_claim_bus(slave);
/* Allow EC to ramp up clock after being awaken.
@@ -53,8 +61,8 @@ static int crosec_spi_io(size_t req_size, size_t resp_size, void *context)
if (spi_xfer(slave, req_buf, req_size, NULL, 0)) {
printk(BIOS_ERR, "%s: Failed to send request.\n", __func__);
- spi_release_bus(slave);
- return -1;
+ ret = -1;
+ goto out;
}
uint8_t byte;
@@ -65,8 +73,8 @@ static int crosec_spi_io(size_t req_size, size_t resp_size, void *context)
if (spi_xfer(slave, NULL, 0, &byte, sizeof(byte))) {
printk(BIOS_ERR, "%s: Failed to receive byte.\n",
__func__);
- spi_release_bus(slave);
- return -1;
+ ret = -1;
+ goto out;
}
if (byte == EcFramingByte)
break;
@@ -75,28 +83,30 @@ static int crosec_spi_io(size_t req_size, size_t resp_size, void *context)
printk(BIOS_ERR,
"%s: Timeout waiting for framing byte.\n",
__func__);
- spi_release_bus(slave);
- return -1;
+ ret = -1;
+ goto out;
}
}
if (spi_xfer(slave, NULL, 0, resp_buf, resp_size)) {
printk(BIOS_ERR, "%s: Failed to receive response.\n", __func__);
- spi_release_bus(slave);
- return -1;
+ ret = -1;
}
+out:
spi_release_bus(slave);
-
- return 0;
+ stopwatch_init_usecs_expire(&cs_cooldown_sw, cs_cooldown_us);
+ return ret;
}
int google_chromeec_command(struct chromeec_command *cec_command)
{
static struct spi_slave *slave = NULL;
- if (!slave)
+ if (!slave) {
slave = spi_setup_slave(CONFIG_EC_GOOGLE_CHROMEEC_SPI_BUS,
CONFIG_EC_GOOGLE_CHROMEEC_SPI_CHIP);
+ stopwatch_init(&cs_cooldown_sw);
+ }
return crosec_command_proto(cec_command, crosec_spi_io, slave);
}