diff options
author | Mary Ruthven <mruthven@chromium.org> | 2018-01-24 10:46:27 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-02-02 23:53:33 -0800 |
commit | 4d3c8c1776f4055d999deea6593f499b588430f2 (patch) | |
tree | 71abc5443a9c125f81a3801cb508db04907a59cd /board/cr50/board.h | |
parent | 9b406da2dcb47bb6dc2c0572b38d028e59cbc1b4 (diff) | |
download | chrome-ec-4d3c8c1776f4055d999deea6593f499b588430f2.tar.gz |
cr50: create ap_uart state machine
This change creates a state machine to handle ap uart detection. It
removes all of the ap_uart stuff from ap_state.c and moves it to
ap_uart_state.c. All boards will now use ap_uart to enable/disable ap
uart and tpm_rst_l to detect the ap state.
Separate ap uart detection from ap detection, so we can disable the ap
uart without enabling deep sleep. If the ap is in S3 on ARM devices,
Cr50 wont be in deep sleep, but the AP UART RX signal wont be pulled up.
In this case we need cr50 ap rx to be disabled and deep sleep to be
disabled.
BUG=b:35647982
BRANCH=cr50
TEST=run firmware_Cr50DeviceState on scalet and electro
Change-Id: I81336a9e232df8d44b325eef59327a1c06a80cba
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/884307
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'board/cr50/board.h')
-rw-r--r-- | board/cr50/board.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/board/cr50/board.h b/board/cr50/board.h index d25314170d..0fe87b4c4c 100644 --- a/board/cr50/board.h +++ b/board/cr50/board.h @@ -260,8 +260,6 @@ int board_rst_pullup_needed(void); int board_tpm_uses_i2c(void); int board_tpm_uses_spi(void); int board_id_is_mismatched(void); -/* Use TPM_RST_L to detect the AP state instead of the uart */ -int board_detect_ap_with_tpm_rst(void); /* Allow for deep sleep to be enabled on AP shutdown */ int board_deep_sleep_allowed(void); @@ -278,15 +276,17 @@ int usb_i2c_board_enable(void); void usb_i2c_board_disable(void); void print_ap_state(void); +void print_ap_uart_state(void); void print_ec_state(void); void print_servo_state(void); int ap_is_on(void); +int ap_uart_is_on(void); int ec_is_on(void); int ec_is_rx_allowed(void); int servo_is_connected(void); -void set_ap_on_deferred(void); +void set_ap_on(void); /* Returns True if chip is brought up in a factory test harness. */ int chip_factory_mode(void); |