summaryrefslogtreecommitdiff
path: root/board/cr50/rdd.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2017-07-27 16:00:52 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-07-29 00:57:00 -0700
commit96173345e7c56f82f6c746f574285849893977dd (patch)
tree568b4ed052b7915ae89c4301fee1d43fc70734f9 /board/cr50/rdd.c
parentb4691fe734f0525bdfcb8d64f305954f42b88351 (diff)
downloadchrome-ec-96173345e7c56f82f6c746f574285849893977dd.tar.gz
cr50: Rename uartn_enabled() to uartn_tx_is_connected()
Because that's what it means. That is, it reports the state of uartn_tx_connect(), not uartn_enable(). No functional changes; just a rename. BUG=none BRANCH=cr50 TEST=make buildall -j Change-Id: Ie2273b277bd73a40307be7ec215417c1225cd567 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/590859
Diffstat (limited to 'board/cr50/rdd.c')
-rw-r--r--board/cr50/rdd.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/board/cr50/rdd.c b/board/cr50/rdd.c
index e645d610c1..622bd8f986 100644
--- a/board/cr50/rdd.c
+++ b/board/cr50/rdd.c
@@ -45,8 +45,8 @@ int is_utmi_wakeup_allowed(void)
}
-/* If the UART TX is enabled the pinmux select will have a non-zero value */
-int uartn_enabled(int uart)
+/* If the UART TX is connected the pinmux select will have a non-zero value */
+int uart_tx_is_connected(int uart)
{
if (uart == UART_AP)
return GREAD(PINMUX, DIOA7_SEL);
@@ -93,7 +93,7 @@ void uartn_tx_connect(int uart)
if (device_get_state(uarts[uart].device) == DEVICE_STATE_ON)
uart_select_tx(uart, uarts[uart].tx_signal);
- else if (!uartn_enabled(uart))
+ else if (!uart_tx_is_connected(uart))
CPRINTS("%s is powered off", uarts[uart].name);
}
@@ -283,11 +283,13 @@ static int command_ccd(int argc, char **argv)
return EC_ERROR_PARAM1;
}
- ccprintf("CCD:%14s\nAP UART: %s\nEC UART: %s\n",
+ ccprintf("CCD:%14s\n",
keep_ccd_enabled ? "forced enable" :
- ccd_is_enabled() ? " enabled" : "disabled",
- uartn_enabled(UART_AP) ? " enabled" : "disabled",
- uartn_enabled(UART_EC) ? " enabled" : "disabled");
+ ccd_is_enabled() ? " enabled" : "disabled");
+ ccprintf("AP UART: %s\nEC UART: %s\n",
+ uart_tx_is_connected(UART_AP) ? " enabled" : "disabled",
+ uart_tx_is_connected(UART_EC) ? " enabled" : "disabled");
+
return EC_SUCCESS;
}
DECLARE_CONSOLE_COMMAND(ccd, command_ccd,