diff options
author | Mary Ruthven <mruthven@chromium.org> | 2017-02-08 11:02:30 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-02-09 12:47:37 -0800 |
commit | 60f008c7af5bd6a47659bad2d242f9ddeed55bd7 (patch) | |
tree | d1c00600aac998bcda2956d12a4af94e9f4b8966 | |
parent | b4561011587819b26395b6a16112b47a00f5a1a9 (diff) | |
download | chrome-ec-60f008c7af5bd6a47659bad2d242f9ddeed55bd7.tar.gz |
cr50: reenable ap uart on servo disconnect
The ap uart tx signal is disconnected if servo is attached, but it is
never reconnected when servo is detached. The 'ccd uart enable' command
only reconnects the EC uart tx signal, so if servo is detached the only
way to reenable ap uart tx is to detach and reattach suzyq. This can
cause cr50 to lose some ccd state.
This change reconnects the ap uart when servo is detached.
BUG=none
BRANCH=none
TEST=manual
disconnect servo
attach suzyq
verify the ap console is read write
attach servo
verify the ap console is read only
detach servo
verify the ap console is read write
Change-Id: I11cdd932b14d968ec77b18adf93dd0d3808fb2e9
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/439704
Reviewed-by: Scott Collyer <scollyer@chromium.org>
-rw-r--r-- | board/cr50/board.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c index afa9826f68..660bdd66c1 100644 --- a/board/cr50/board.c +++ b/board/cr50/board.c @@ -725,7 +725,12 @@ static void servo_deferred(void) if (servo_state_unknown()) return; - device_powered_off(DEVICE_SERVO); + /* + * If servo was detached reconnect the AP uart making it read write + * again. + */ + if (device_powered_off(DEVICE_SERVO) == EC_SUCCESS) + uartn_tx_connect(UART_AP); } DECLARE_DEFERRED(servo_deferred); |