From 60fb50d60d9a25cd4b4c254b96336bfb5e215ce8 Mon Sep 17 00:00:00 2001 From: Przemyslaw Bida Date: Mon, 2 Oct 2023 09:12:43 +0200 Subject: [PATCH] [nrf fromlist] net: openthread: Remove waiting for DTR in openthread UART. Uart driver for openthread have been waiting for host to start communicating with coprocessor, during booting of the Zephyr and by that blocking start os OS. There is no longer a need for that since the stack will be soft rebooted after host connects to coprocessor, removing the need to wait on host communication. Upstream PR: https://github.com/zephyrproject-rtos/zephyr/pull/63355 Signed-off-by: Przemyslaw Bida (cherry picked from commit cc85223ed4d5907bd457cb8145672c2167821cbf) --- modules/openthread/platform/uart.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/modules/openthread/platform/uart.c b/modules/openthread/platform/uart.c index dd62d36ee11..ebf156ded15 100644 --- a/modules/openthread/platform/uart.c +++ b/modules/openthread/platform/uart.c @@ -170,7 +170,6 @@ otError otPlatUartEnable(void) if (DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_ot_uart), zephyr_cdc_acm_uart)) { int ret; - uint32_t dtr = 0U; ret = usb_enable(NULL); if (ret != 0 && ret != -EALREADY) { @@ -178,20 +177,6 @@ otError otPlatUartEnable(void) return OT_ERROR_FAILED; } - LOG_INF("Waiting for host to be ready to communicate"); - - /* Data Terminal Ready - check if host is ready to communicate */ - while (!dtr) { - ret = uart_line_ctrl_get(ot_uart.dev, - UART_LINE_CTRL_DTR, &dtr); - if (ret) { - LOG_ERR("Failed to get Data Terminal Ready line state: %d", - ret); - continue; - } - k_msleep(100); - } - /* Data Carrier Detect Modem - mark connection as established */ (void)uart_line_ctrl_set(ot_uart.dev, UART_LINE_CTRL_DCD, 1); /* Data Set Ready - the NCP SoC is ready to communicate */