summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2016-09-02 11:36:06 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-09-02 18:34:19 -0700
commitb2a751cfd8b5f543e7b40f32c81a7a6f876c42c7 (patch)
tree19dbae7173f5d22eb3ac6cb64218fef661b804ce /include/system.h
parenta22b506a76b269b35a2c0242f5369cb1884dffce (diff)
downloadchrome-ec-b2a751cfd8b5f543e7b40f32c81a7a6f876c42c7.tar.gz
cr50: mark updated image as good once a usb request is received
There is now a call to reset the retry counter before the hard reset after an update. Cr50 will use the updated image for the next 5 boots, but on the 6th it sees the retry counter is greater than 5 and then jumps back to the old image. Cr50 needs to call system_process_retry_counter to reset the counter and corrupt the old image header to prevent falling back to the old image. Normally the reset counter would be processed after it receives a TPM command. Reef does not have Cr50 TPM support. Until Cr50 has TPM support for Reef, Cr50 should have a different point to know when the update is good. This change adds a board property to mark the process the reset counter once the Cr50 USB controller receives a set address request from the host. On Reef the controller defaults to the AP PHY when suzyq is not connected, so it should have a connection to the AP or through suzyq after boot. The board property is only added to Reef. Behavior on Kevin and Gru is unchanged. BUG=chrome-os-partner:56864 BRANCH=none TEST=update reef. Wait until Cr50 prints 'SETAD' then run 'rw 0x4000012c' and verify it is reset to 0. Change-Id: If517202f25a694cd70550e3be047ea502e7c5383 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/380354
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/system.h b/include/system.h
index d8d10950ce..d6d2c063b7 100644
--- a/include/system.h
+++ b/include/system.h
@@ -467,7 +467,10 @@ int system_process_retry_counter(void);
#define BOARD_SLAVE_CONFIG_I2C (1 << 1) /* Slave I2C interface */
#define BOARD_USB_AP (1 << 2) /* One of the PHYs is */
/* connected to the AP */
-#define BOARD_DISABLE_UART0_RX (1 << 3) /* Disable UART0 RX */
+#define BOARD_DISABLE_UART0_RX (1 << 3) /* Disable UART0 RX */
+#define BOARD_MARK_UPDATE_ON_USB_REQ (1 << 4) /* update is good once the */
+ /* controller gets a request */
+
/**
* Get board properites
*