From 3786e7e10a67aefc72945c3d8aa3cbb2c3b1ac1d Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Thu, 7 Oct 2021 11:23:07 -0500 Subject: rdd: only enable AP UART if the AP is on When the AP is off, cr50 doesn't need to enable the AP UART. Having it enabled could cause power leakage if the signals aren't terminated correctly. Check ap_is_on and ap_uart_is_on before enabling the AP UART. BUG=b:136602563 TEST=firmware_Cr50DeviceState Change-Id: I192bdc4caef8cfa0ce6d8a3ca181b16388e35cd4 Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3219756 Reviewed-by: Vadim Bendebury (cherry picked from commit 39447a20c6e663d83b8581330378275530b3b2f3) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3229791 Reviewed-by: Andrey Pronin (cherry picked from commit b4dba12b1485aaab9a35ef221f4de72aedb9d6c8) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3260174 --- board/cr50/rdd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/cr50/rdd.c b/board/cr50/rdd.c index 147596672b..0f6fcc6674 100644 --- a/board/cr50/rdd.c +++ b/board/cr50/rdd.c @@ -230,7 +230,7 @@ static void ccd_state_change_hook(void) /* Start out by figuring what flags we might want enabled */ /* Enable AP UART RX if that device is on */ - if (ap_uart_is_on()) + if (ap_uart_is_on() && ap_is_on()) flags_want |= CCD_ENABLE_UART_AP; /* * Enable EC UART RX. -- cgit v1.2.1