summaryrefslogtreecommitdiff
path: root/chip/g/usb_spi.h
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2016-07-27 17:45:04 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-28 20:20:51 -0700
commit12f22933e30f169c214520324dc1570143744d38 (patch)
treed861e0bf5bbe73ac135414f791b26f4b053f23e1 /chip/g/usb_spi.h
parent3531d6123bcc742b390fb8fa2b9b65362fa02777 (diff)
downloadchrome-ec-12f22933e30f169c214520324dc1570143744d38.tar.gz
cr50: fix usb spi to disable resets while doing updates
We need to ignore sys_rst_l right now when we use the usb spi endpoint to update the AP or EC. We hold the EC and AP in reset and this causes sys_rst_l to be asserted at the start of updating the AP and when the EC comes out of reset. Using the USB SPI endpoint may require doing a bunch of transactions back to back. Cr50 should not reset itself between each one. This change postpones the reset until we're done using the usb spi endpoint. Once sys_rst_l just resets the TPM we can remove all of this. BUG=chrome-os-partner:52366 BUG=chrome-os-partner:54982 BRANCH=none TEST=manual verify 'util/flash_ec --board=kevin --raiden' updates the EC 'sudo flashrom -p raiden_debug_spi:target=AP -w $IMG' updates the AP The AP and cr50 reset after usb_spi is disabled. Change-Id: I68a76012bc7bf6d3abd073a70f0b90e440d72c49 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/364051 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip/g/usb_spi.h')
-rw-r--r--chip/g/usb_spi.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/g/usb_spi.h b/chip/g/usb_spi.h
index 2002d93e9f..7a31e41d81 100644
--- a/chip/g/usb_spi.h
+++ b/chip/g/usb_spi.h
@@ -228,9 +228,9 @@ void usb_spi_board_enable(struct usb_spi_config const *config);
void usb_spi_board_disable(struct usb_spi_config const *config);
/*
- * Returns true if AP SPI update is running, needed to properly handle
- * SYS_RST_L input state changes.
+ * Returns true if SPI update is running, needed to properly handle SYS_RST_L
+ * input state changes.
*/
-int ap_spi_update_in_progress(void);
+int usb_spi_update_in_progress(void);
#endif /* __CROS_EC_USB_SPI_H */