diff --git a/boards/arm/arduino_nano_33_ble/Kconfig.board b/boards/arm/arduino_nano_33_ble/Kconfig.board index ebf4b156c45..ba2beb5a70d 100644 --- a/boards/arm/arduino_nano_33_ble/Kconfig.board +++ b/boards/arm/arduino_nano_33_ble/Kconfig.board @@ -13,7 +13,6 @@ config BOARD_ARDUINO_NANO_33_BLE_EN_USB_CONSOLE select CONSOLE select PRINTK select UART_INTERRUPT_DRIVEN - select USB_UART_CONSOLE config BOARD_ARDUINO_NANO_33_BLE_INIT_SENSORS bool "Initializes the internal I2C sensors on the board" diff --git a/boards/arm/bl654_usb/Kconfig.defconfig b/boards/arm/bl654_usb/Kconfig.defconfig index 56125667cbb..3ce20bab1f7 100644 --- a/boards/arm/bl654_usb/Kconfig.defconfig +++ b/boards/arm/bl654_usb/Kconfig.defconfig @@ -25,9 +25,6 @@ config FLASH_LOAD_OFFSET if USB_DEVICE_STACK -config USB_UART_CONSOLE - default y - config UART_LINE_CTRL default y diff --git a/boards/arm/degu_evk/Kconfig.defconfig b/boards/arm/degu_evk/Kconfig.defconfig index 8728d10f844..ebd494384d9 100644 --- a/boards/arm/degu_evk/Kconfig.defconfig +++ b/boards/arm/degu_evk/Kconfig.defconfig @@ -13,9 +13,6 @@ if USB_DEVICE_STACK config USB_DEVICE_PRODUCT default "Degu Evaluation Kit" -config USB_UART_CONSOLE - default y - config UART_INTERRUPT_DRIVEN default y diff --git a/doc/reference/usb/uds_cdc_acm.rst b/doc/reference/usb/uds_cdc_acm.rst index 94851ea3c2c..2e083575d14 100644 --- a/doc/reference/usb/uds_cdc_acm.rst +++ b/doc/reference/usb/uds_cdc_acm.rst @@ -51,9 +51,6 @@ Console over CDC ACM UART With the CDC ACM UART node from above and ``zephyr,console`` property of the chosen node, we can describe that CDC ACM UART is to be used with the console. A similar overlay file is used by :ref:`cdc-acm-console`. -If USB device support is enabled in the application, as in the console sample, -:kconfig:`CONFIG_USB_UART_CONSOLE` must be enabled, -which does nothing but change the initialization time of the console driver. .. code-block:: devicetree diff --git a/drivers/console/Kconfig b/drivers/console/Kconfig index 8cc1d1f3750..c21fd94ee04 100644 --- a/drivers/console/Kconfig +++ b/drivers/console/Kconfig @@ -41,7 +41,6 @@ config UART_CONSOLE config UART_CONSOLE_INIT_PRIORITY int "Init priority" - default 95 if USB_UART_CONSOLE default 60 depends on UART_CONSOLE help @@ -89,15 +88,6 @@ config UART_CONSOLE_INPUT_EXPIRED_TIMEOUT Fixed amount of time which unit is milliseconds to keep the UART console in use flag true. -config USB_UART_CONSOLE - bool "Use USB port for console outputs" - select UART_CONSOLE - select USB_CDC_ACM - help - Enable this option to use the USB CDC ACM class for console. - As for the console driver, this option only changes the initialization - level. - config RAM_CONSOLE bool "Use RAM console" select CONSOLE_HAS_DRIVER diff --git a/drivers/console/uart_console.c b/drivers/console/uart_console.c index 5c105857d0f..7462f375073 100644 --- a/drivers/console/uart_console.c +++ b/drivers/console/uart_console.c @@ -609,9 +609,7 @@ static int uart_console_init(const struct device *arg) /* UART console initializes after the UART device itself */ SYS_INIT(uart_console_init, -#if defined(CONFIG_USB_UART_CONSOLE) - APPLICATION, -#elif defined(CONFIG_EARLY_CONSOLE) +#if defined(CONFIG_EARLY_CONSOLE) PRE_KERNEL_1, #else POST_KERNEL, diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 5baf5a3c846..b84cabe169f 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -31,6 +31,12 @@ config SERIAL_SUPPORT_INTERRUPT This is an option to be enabled by individual serial driver to signal that the driver and hardware supports interrupts. +config SERIAL_INIT_PRIORITY + int "Serial init priority" + default KERNEL_INIT_PRIORITY_DEVICE + help + Serial driver device initialization priority. + config UART_USE_RUNTIME_CONFIGURE bool "Enable runtime configuration for UART controllers" default y diff --git a/drivers/serial/leuart_gecko.c b/drivers/serial/leuart_gecko.c index ee877b7f40d..62d1478d4b4 100644 --- a/drivers/serial/leuart_gecko.c +++ b/drivers/serial/leuart_gecko.c @@ -354,7 +354,7 @@ static struct leuart_gecko_data leuart_gecko_0_data; DEVICE_DT_INST_DEFINE(0, &leuart_gecko_init, NULL, &leuart_gecko_0_data, &leuart_gecko_0_config, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &leuart_gecko_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -407,7 +407,7 @@ static struct leuart_gecko_data leuart_gecko_1_data; DEVICE_DT_INST_DEFINE(1, &leuart_gecko_init, NULL, &leuart_gecko_1_data, &leuart_gecko_1_config, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &leuart_gecko_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN diff --git a/drivers/serial/serial_test.c b/drivers/serial/serial_test.c index d70e110e4b6..13da30d2b06 100644 --- a/drivers/serial/serial_test.c +++ b/drivers/serial/serial_test.c @@ -61,7 +61,7 @@ static int serial_vnd_init(const struct device *dev) #define VND_SERIAL_INIT(n) \ DEVICE_DT_INST_DEFINE(n, &serial_vnd_init, NULL, \ NULL, NULL, POST_KERNEL, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &serial_vnd_api); DT_INST_FOREACH_STATUS_OKAY(VND_SERIAL_INIT) diff --git a/drivers/serial/uart_altera_jtag_hal.c b/drivers/serial/uart_altera_jtag_hal.c index 98eb2b5f231..79d42b3720e 100644 --- a/drivers/serial/uart_altera_jtag_hal.c +++ b/drivers/serial/uart_altera_jtag_hal.c @@ -61,5 +61,5 @@ static const struct uart_device_config uart_altera_jtag_dev_cfg_0 = { DEVICE_DT_INST_DEFINE(0, uart_altera_jtag_init, NULL, NULL, &uart_altera_jtag_dev_cfg_0, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, &uart_altera_jtag_driver_api); diff --git a/drivers/serial/uart_apbuart.c b/drivers/serial/uart_apbuart.c index 04e85aa31d3..f74ab6648c3 100644 --- a/drivers/serial/uart_apbuart.c +++ b/drivers/serial/uart_apbuart.c @@ -538,7 +538,7 @@ static const struct uart_driver_api apbuart_driver_api = { &apbuart##index##_data, \ &apbuart##index##_config, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &apbuart_driver_api); DT_INST_FOREACH_STATUS_OKAY(APBUART_INIT) diff --git a/drivers/serial/uart_b91.c b/drivers/serial/uart_b91.c index 8c40d698d9e..58150d61b2c 100644 --- a/drivers/serial/uart_b91.c +++ b/drivers/serial/uart_b91.c @@ -558,7 +558,7 @@ static const struct uart_driver_api uart_b91_driver_api = { &uart_b91_data_##n, \ &uart_b91_cfg_##n, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ (void *)&uart_b91_driver_api); \ \ static void uart_b91_irq_connect_##n(void) \ diff --git a/drivers/serial/uart_cc13xx_cc26xx.c b/drivers/serial/uart_cc13xx_cc26xx.c index 50e7aec6fff..fb5313032dc 100644 --- a/drivers/serial/uart_cc13xx_cc26xx.c +++ b/drivers/serial/uart_cc13xx_cc26xx.c @@ -539,7 +539,7 @@ static const struct uart_driver_api uart_cc13xx_cc26xx_driver_api = { uart_cc13xx_cc26xx_init_##n, \ uart_cc13xx_cc26xx_pm_control, \ &uart_cc13xx_cc26xx_data_##n, &uart_cc13xx_cc26xx_config_##n,\ - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &uart_cc13xx_cc26xx_driver_api) #ifdef CONFIG_PM_DEVICE diff --git a/drivers/serial/uart_cc32xx.c b/drivers/serial/uart_cc32xx.c index 4a0b278604e..e84ec87d1c0 100644 --- a/drivers/serial/uart_cc32xx.c +++ b/drivers/serial/uart_cc32xx.c @@ -331,7 +331,7 @@ static struct uart_cc32xx_dev_data_t uart_cc32xx_dev_data_##idx = { \ DEVICE_DT_INST_DEFINE(idx, uart_cc32xx_init, \ NULL, &uart_cc32xx_dev_data_##idx, \ &uart_cc32xx_dev_cfg_##idx, \ - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ (void *)&uart_cc32xx_driver_api); \ DT_INST_FOREACH_STATUS_OKAY(UART_32XX_DEVICE); diff --git a/drivers/serial/uart_cmsdk_apb.c b/drivers/serial/uart_cmsdk_apb.c index b39428840be..5688351ec60 100644 --- a/drivers/serial/uart_cmsdk_apb.c +++ b/drivers/serial/uart_cmsdk_apb.c @@ -508,7 +508,7 @@ DEVICE_DT_INST_DEFINE(0, NULL, &uart_cmsdk_apb_dev_data_0, &uart_cmsdk_apb_dev_cfg_0, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &uart_cmsdk_apb_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -573,7 +573,7 @@ DEVICE_DT_INST_DEFINE(1, NULL, &uart_cmsdk_apb_dev_data_1, &uart_cmsdk_apb_dev_cfg_1, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &uart_cmsdk_apb_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -638,7 +638,7 @@ DEVICE_DT_INST_DEFINE(2, NULL, &uart_cmsdk_apb_dev_data_2, &uart_cmsdk_apb_dev_cfg_2, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &uart_cmsdk_apb_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -703,7 +703,7 @@ DEVICE_DT_INST_DEFINE(3, NULL, &uart_cmsdk_apb_dev_data_3, &uart_cmsdk_apb_dev_cfg_3, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &uart_cmsdk_apb_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -768,7 +768,7 @@ DEVICE_DT_INST_DEFINE(4, NULL, &uart_cmsdk_apb_dev_data_4, &uart_cmsdk_apb_dev_cfg_4, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &uart_cmsdk_apb_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN diff --git a/drivers/serial/uart_esp32.c b/drivers/serial/uart_esp32.c index 4d577370f1c..a734365e2aa 100644 --- a/drivers/serial/uart_esp32.c +++ b/drivers/serial/uart_esp32.c @@ -519,7 +519,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \ &uart_esp32_data_##idx, \ &uart_esp32_cfg_port_##idx, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_esp32_api); #if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) diff --git a/drivers/serial/uart_gecko.c b/drivers/serial/uart_gecko.c index 2ef4c08415e..3ae77177703 100644 --- a/drivers/serial/uart_gecko.c +++ b/drivers/serial/uart_gecko.c @@ -549,7 +549,7 @@ static const struct uart_driver_api uart_gecko_driver_api = { DEVICE_DT_INST_DEFINE(idx, &uart_gecko_init, \ NULL, &uart_gecko_data_##idx, \ &uart_gecko_cfg_##idx, PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_gecko_driver_api); \ \ \ @@ -607,7 +607,7 @@ DT_INST_FOREACH_STATUS_OKAY(GECKO_UART_INIT) DEVICE_DT_INST_DEFINE(idx, &uart_gecko_init, NULL, \ &usart_gecko_data_##idx, \ &usart_gecko_cfg_##idx, PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_gecko_driver_api); \ \ GECKO_USART_IRQ_HANDLER(idx) diff --git a/drivers/serial/uart_imx.c b/drivers/serial/uart_imx.c index 611fdb1939e..d120d932969 100644 --- a/drivers/serial/uart_imx.c +++ b/drivers/serial/uart_imx.c @@ -319,7 +319,7 @@ static const struct uart_driver_api uart_imx_driver_api = { DEVICE_DT_INST_DEFINE(n, &uart_imx_init, NULL, \ &imx_uart_##n##_data, &imx_uart_##n##_config, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_imx_driver_api); \ \ UART_IMX_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_liteuart.c b/drivers/serial/uart_liteuart.c index 972852d96f8..fc55e2a1843 100644 --- a/drivers/serial/uart_liteuart.c +++ b/drivers/serial/uart_liteuart.c @@ -321,7 +321,7 @@ DEVICE_DT_INST_DEFINE(0, uart_liteuart_init, NULL, &uart_liteuart_data_0, &uart_liteuart_dev_cfg_0, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, (void *)&uart_liteuart_driver_api); static int uart_liteuart_init(const struct device *dev) diff --git a/drivers/serial/uart_lpc11u6x.c b/drivers/serial/uart_lpc11u6x.c index f318aac79f7..8bcd5a25877 100644 --- a/drivers/serial/uart_lpc11u6x.c +++ b/drivers/serial/uart_lpc11u6x.c @@ -446,7 +446,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart0), &lpc11u6x_uart0_init, NULL, &uart0_data, &uart0_config, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_OBJECTS, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, &uart0_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -904,7 +904,7 @@ static struct lpc11u6x_uartx_data uart_data_##idx; \ DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \ &lpc11u6x_uartx_init, NULL, \ &uart_data_##idx, &uart_cfg_##idx, \ - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_OBJECTS, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &uartx_api) #if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) diff --git a/drivers/serial/uart_mchp_xec.c b/drivers/serial/uart_mchp_xec.c index 8affdc764bb..0f329580ea2 100644 --- a/drivers/serial/uart_mchp_xec.c +++ b/drivers/serial/uart_mchp_xec.c @@ -894,7 +894,7 @@ static const struct uart_driver_api uart_xec_driver_api = { &uart_xec_dev_data_##n, \ &uart_xec_dev_cfg_##n, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_xec_driver_api); \ UART_XEC_IRQ_FUNC_DEFINE(n) diff --git a/drivers/serial/uart_mcux.c b/drivers/serial/uart_mcux.c index 011e85ee2d2..0e9ca5c0972 100644 --- a/drivers/serial/uart_mcux.c +++ b/drivers/serial/uart_mcux.c @@ -414,7 +414,7 @@ static const struct uart_mcux_config uart_mcux_##n##_config = { \ &uart_mcux_##n##_data, \ &uart_mcux_##n##_config, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_mcux_driver_api); \ \ UART_MCUX_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_mcux_flexcomm.c b/drivers/serial/uart_mcux_flexcomm.c index fd442e31001..51d214a1f43 100644 --- a/drivers/serial/uart_mcux_flexcomm.c +++ b/drivers/serial/uart_mcux_flexcomm.c @@ -348,7 +348,7 @@ static const struct mcux_flexcomm_config mcux_flexcomm_##n##_config = { \ &mcux_flexcomm_##n##_data, \ &mcux_flexcomm_##n##_config, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &mcux_flexcomm_driver_api); \ \ UART_MCUX_FLEXCOMM_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_mcux_iuart.c b/drivers/serial/uart_mcux_iuart.c index b12a4fe66c1..076fb6e822a 100644 --- a/drivers/serial/uart_mcux_iuart.c +++ b/drivers/serial/uart_mcux_iuart.c @@ -317,7 +317,7 @@ static const struct mcux_iuart_config mcux_iuart_##n##_config = { \ &mcux_iuart_##n##_data, \ &mcux_iuart_##n##_config, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &mcux_iuart_driver_api); \ \ IUART_MCUX_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_mcux_lpsci.c b/drivers/serial/uart_mcux_lpsci.c index 254e05d6a8d..cab60ca1f77 100644 --- a/drivers/serial/uart_mcux_lpsci.c +++ b/drivers/serial/uart_mcux_lpsci.c @@ -321,7 +321,7 @@ static const struct mcux_lpsci_config mcux_lpsci_##n##_config = { \ &mcux_lpsci_##n##_data, \ &mcux_lpsci_##n##_config, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &mcux_lpsci_driver_api); \ \ MCUX_LPSCI_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_mcux_lpuart.c b/drivers/serial/uart_mcux_lpuart.c index 55018c4cd8c..34b01effa86 100644 --- a/drivers/serial/uart_mcux_lpuart.c +++ b/drivers/serial/uart_mcux_lpuart.c @@ -448,7 +448,7 @@ static const struct mcux_lpuart_config mcux_lpuart_##n##_config = { \ &mcux_lpuart_##n##_data, \ &mcux_lpuart_##n##_config, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &mcux_lpuart_driver_api); \ \ LPUART_MCUX_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_miv.c b/drivers/serial/uart_miv.c index 628351b4a19..fe73de44114 100644 --- a/drivers/serial/uart_miv.c +++ b/drivers/serial/uart_miv.c @@ -409,7 +409,7 @@ static const struct uart_miv_device_config uart_miv_dev_cfg_0 = { DEVICE_DT_INST_DEFINE(0, uart_miv_init, NULL, &uart_miv_data_0, &uart_miv_dev_cfg_0, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, (void *)&uart_miv_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN diff --git a/drivers/serial/uart_msp432p4xx.c b/drivers/serial/uart_msp432p4xx.c index e55c40536e6..f6f4e4f51a0 100644 --- a/drivers/serial/uart_msp432p4xx.c +++ b/drivers/serial/uart_msp432p4xx.c @@ -362,5 +362,5 @@ DEVICE_DT_INST_DEFINE(0, uart_msp432p4xx_init, NULL, &uart_msp432p4xx_dev_data_0, &uart_msp432p4xx_dev_cfg_0, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, (void *)&uart_msp432p4xx_driver_api); diff --git a/drivers/serial/uart_native_posix.c b/drivers/serial/uart_native_posix.c index 42e94312b9c..b4fb43fbba6 100644 --- a/drivers/serial/uart_native_posix.c +++ b/drivers/serial/uart_native_posix.c @@ -367,14 +367,14 @@ static int np_uart_tty_poll_in(const struct device *dev, DEVICE_DT_INST_DEFINE(0, &np_uart_0_init, NULL, (void *)&native_uart_status_0, NULL, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, &np_uart_driver_api_0); #if defined(CONFIG_UART_NATIVE_POSIX_PORT_1_ENABLE) DEVICE_DT_INST_DEFINE(1, &np_uart_1_init, NULL, (void *)&native_uart_status_1, NULL, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, &np_uart_driver_api_1); #endif /* CONFIG_UART_NATIVE_POSIX_PORT_1_ENABLE */ diff --git a/drivers/serial/uart_npcx.c b/drivers/serial/uart_npcx.c index 7a8c4b75b4c..a6448f6505c 100644 --- a/drivers/serial/uart_npcx.c +++ b/drivers/serial/uart_npcx.c @@ -506,7 +506,7 @@ static inline int uart_npcx_pm_control(const struct device *dev, &uart_npcx_init, \ uart_npcx_pm_control, \ &uart_npcx_data_##inst, &uart_npcx_cfg_##inst, \ - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &uart_npcx_driver_api); \ \ NPCX_UART_IRQ_CONFIG_FUNC(inst) diff --git a/drivers/serial/uart_nrfx_uart.c b/drivers/serial/uart_nrfx_uart.c index 02dba0aae9c..9b55e0d946e 100644 --- a/drivers/serial/uart_nrfx_uart.c +++ b/drivers/serial/uart_nrfx_uart.c @@ -1188,5 +1188,5 @@ DEVICE_DT_INST_DEFINE(0, NULL, /* Initialize UART device before UART console. */ PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &uart_nrfx_uart_driver_api); diff --git a/drivers/serial/uart_nrfx_uarte.c b/drivers/serial/uart_nrfx_uarte.c index a615b3c6c6b..ee11bc5a7e7 100644 --- a/drivers/serial/uart_nrfx_uarte.c +++ b/drivers/serial/uart_nrfx_uarte.c @@ -1997,7 +1997,7 @@ static int uarte_nrfx_pm_control(const struct device *dev, &uarte_##idx##_data, \ &uarte_##idx##z_config, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_nrfx_uarte_driver_api) #define UARTE_CONFIG(idx) \ diff --git a/drivers/serial/uart_ns16550.c b/drivers/serial/uart_ns16550.c index 484ed60b3a4..37da7104763 100644 --- a/drivers/serial/uart_ns16550.c +++ b/drivers/serial/uart_ns16550.c @@ -1090,7 +1090,7 @@ static const struct uart_driver_api uart_ns16550_driver_api = { }; \ DEVICE_DT_INST_DEFINE(n, &uart_ns16550_init, NULL, \ &uart_ns16550_dev_data_##n, &uart_ns16550_dev_cfg_##n, \ - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &uart_ns16550_driver_api); \ UART_NS16550_IRQ_FUNC_DEFINE(n) diff --git a/drivers/serial/uart_numicro.c b/drivers/serial/uart_numicro.c index a522d36ca8c..40941304fdc 100644 --- a/drivers/serial/uart_numicro.c +++ b/drivers/serial/uart_numicro.c @@ -207,7 +207,7 @@ DEVICE_DT_INST_DEFINE(index, \ NULL, \ &uart_numicro_data_##index, \ &uart_numicro_cfg_##index, \ - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &uart_numicro_driver_api); DT_INST_FOREACH_STATUS_OKAY(NUMICRO_INIT) diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c index ed667a51f83..f6c9e2e2818 100644 --- a/drivers/serial/uart_pl011.c +++ b/drivers/serial/uart_pl011.c @@ -443,7 +443,7 @@ DEVICE_DT_INST_DEFINE(0, NULL, &pl011_data_port_0, &pl011_cfg_port_0, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &pl011_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -506,7 +506,7 @@ DEVICE_DT_INST_DEFINE(1, NULL, &pl011_data_port_1, &pl011_cfg_port_1, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &pl011_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -571,7 +571,7 @@ DEVICE_DT_INST_DEFINE(0, NULL, &pl011_data_sbsa, &pl011_cfg_sbsa, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + CONFIG_SERIAL_INIT_PRIORITY, &pl011_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN diff --git a/drivers/serial/uart_psoc6.c b/drivers/serial/uart_psoc6.c index 223376969a8..bf1be63d784 100644 --- a/drivers/serial/uart_psoc6.c +++ b/drivers/serial/uart_psoc6.c @@ -361,7 +361,7 @@ static const struct uart_driver_api uart_psoc6_driver_api = { DEVICE_DT_INST_DEFINE(n, &uart_psoc6_init, NULL, \ CY_PSOC6_UART_DECL_DATA_PTR(n), \ &cy_psoc6_uart##n##_config, PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_psoc6_driver_api); DT_INST_FOREACH_STATUS_OKAY(CY_PSOC6_UART_INIT) diff --git a/drivers/serial/uart_rcar.c b/drivers/serial/uart_rcar.c index 73f2bcfb9b0..2ffc96ffb95 100644 --- a/drivers/serial/uart_rcar.c +++ b/drivers/serial/uart_rcar.c @@ -583,7 +583,7 @@ static const struct uart_driver_api uart_rcar_driver_api = { NULL, \ &uart_rcar_data_##n, \ &uart_rcar_cfg_##n, \ - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &uart_rcar_driver_api); \ \ UART_RCAR_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_rom_esp32c3.c b/drivers/serial/uart_rom_esp32c3.c index d2c807da0c3..e10930ef8ce 100644 --- a/drivers/serial/uart_rom_esp32c3.c +++ b/drivers/serial/uart_rom_esp32c3.c @@ -53,7 +53,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \ NULL, \ NULL, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_rom_esp32c3_api); \ DT_INST_FOREACH_STATUS_OKAY(ESP32C3_ROM_UART_INIT) diff --git a/drivers/serial/uart_rom_esp32s2.c b/drivers/serial/uart_rom_esp32s2.c index 3b8e3148580..f989ca14d21 100644 --- a/drivers/serial/uart_rom_esp32s2.c +++ b/drivers/serial/uart_rom_esp32s2.c @@ -51,7 +51,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \ NULL, \ NULL, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_rom_esp32s2_api); \ DT_INST_FOREACH_STATUS_OKAY(ESP32S2_ROM_UART_INIT) diff --git a/drivers/serial/uart_rtt.c b/drivers/serial/uart_rtt.c index a214a1c4d26..ea94328d493 100644 --- a/drivers/serial/uart_rtt.c +++ b/drivers/serial/uart_rtt.c @@ -217,7 +217,7 @@ static const struct uart_driver_api uart_rtt_driver_api = { \ DEVICE_DT_DEFINE(UART_RTT(idx), uart_rtt_init, NULL, \ &uart_rtt##idx##_data, config, \ - PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_2, CONFIG_SERIAL_INIT_PRIORITY, \ &uart_rtt_driver_api) #ifdef CONFIG_UART_RTT_0 diff --git a/drivers/serial/uart_rv32m1_lpuart.c b/drivers/serial/uart_rv32m1_lpuart.c index 5f7dc3652d4..0bc20c5fa2e 100644 --- a/drivers/serial/uart_rv32m1_lpuart.c +++ b/drivers/serial/uart_rv32m1_lpuart.c @@ -334,7 +334,7 @@ static const struct uart_driver_api rv32m1_lpuart_driver_api = { &rv32m1_lpuart_##n##_data, \ &rv32m1_lpuart_##n##_cfg, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &rv32m1_lpuart_driver_api); \ \ RV32M1_LPUART_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_sam.c b/drivers/serial/uart_sam.c index d7250f3bbd3..46d85184a59 100644 --- a/drivers/serial/uart_sam.c +++ b/drivers/serial/uart_sam.c @@ -364,7 +364,7 @@ static const struct uart_driver_api uart_sam_driver_api = { DEVICE_DT_INST_DEFINE(n, &uart_sam_init, \ NULL, &uart##n##_sam_data, \ &uart##n##_sam_config, PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_sam_driver_api); \ \ UART_SAM_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_sam0.c b/drivers/serial/uart_sam0.c index b39d2b77d22..4ab49265d8a 100644 --- a/drivers/serial/uart_sam0.c +++ b/drivers/serial/uart_sam0.c @@ -1256,7 +1256,7 @@ UART_SAM0_CONFIG_DEFN(n); \ DEVICE_DT_INST_DEFINE(n, uart_sam0_init, NULL, \ &uart_sam0_data_##n, \ &uart_sam0_config_##n, PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_sam0_driver_api); \ UART_SAM0_IRQ_HANDLER(n) diff --git a/drivers/serial/uart_sifive.c b/drivers/serial/uart_sifive.c index f7f20d551c7..75cc9c464f4 100644 --- a/drivers/serial/uart_sifive.c +++ b/drivers/serial/uart_sifive.c @@ -396,7 +396,7 @@ DEVICE_DT_INST_DEFINE(0, uart_sifive_init, NULL, &uart_sifive_data_0, &uart_sifive_dev_cfg_0, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, (void *)&uart_sifive_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -435,7 +435,7 @@ DEVICE_DT_INST_DEFINE(1, uart_sifive_init, NULL, &uart_sifive_data_1, &uart_sifive_dev_cfg_1, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, (void *)&uart_sifive_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN diff --git a/drivers/serial/uart_stellaris.c b/drivers/serial/uart_stellaris.c index 722aea504dc..b5c71269e2c 100644 --- a/drivers/serial/uart_stellaris.c +++ b/drivers/serial/uart_stellaris.c @@ -652,7 +652,7 @@ DEVICE_DT_INST_DEFINE(0, &uart_stellaris_init, NULL, &uart_stellaris_dev_data_0, &uart_stellaris_dev_cfg_0, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, &uart_stellaris_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -691,7 +691,7 @@ DEVICE_DT_INST_DEFINE(1, &uart_stellaris_init, NULL, &uart_stellaris_dev_data_1, &uart_stellaris_dev_cfg_1, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, &uart_stellaris_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -730,7 +730,7 @@ DEVICE_DT_INST_DEFINE(2, &uart_stellaris_init, NULL, &uart_stellaris_dev_data_2, &uart_stellaris_dev_cfg_2, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, &uart_stellaris_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c index b0a3ce5f781..f960987d1a8 100644 --- a/drivers/serial/uart_stm32.c +++ b/drivers/serial/uart_stm32.c @@ -1605,7 +1605,7 @@ DEVICE_DT_INST_DEFINE(index, \ &uart_stm32_init, \ NULL, \ &uart_stm32_data_##index, &uart_stm32_cfg_##index, \ - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &uart_stm32_driver_api); \ \ STM32_UART_IRQ_HANDLER(index) diff --git a/drivers/serial/uart_xlnx_ps.c b/drivers/serial/uart_xlnx_ps.c index 628ffbe164e..57349a681b5 100644 --- a/drivers/serial/uart_xlnx_ps.c +++ b/drivers/serial/uart_xlnx_ps.c @@ -1214,7 +1214,7 @@ DEVICE_DT_INST_DEFINE(port, \ NULL, \ &uart_xlnx_ps_dev_data_##port, \ &uart_xlnx_ps_dev_cfg_##port, \ - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &uart_xlnx_ps_driver_api) #define UART_XLNX_INSTANTIATE(inst) \ diff --git a/drivers/serial/uart_xlnx_uartlite.c b/drivers/serial/uart_xlnx_uartlite.c index 78035acfc6b..2f8ab3053b7 100644 --- a/drivers/serial/uart_xlnx_uartlite.c +++ b/drivers/serial/uart_xlnx_uartlite.c @@ -379,7 +379,7 @@ static const struct xlnx_uartlite_config xlnx_uartlite_##n##_config = { \ &xlnx_uartlite_##n##_data, \ &xlnx_uartlite_##n##_config, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &xlnx_uartlite_driver_api); \ \ XLNX_UARTLITE_CONFIG_FUNC(n) \ diff --git a/drivers/serial/uart_xmc4xxx.c b/drivers/serial/uart_xmc4xxx.c index 6fd52a74811..991d75b894e 100644 --- a/drivers/serial/uart_xmc4xxx.c +++ b/drivers/serial/uart_xmc4xxx.c @@ -77,7 +77,7 @@ static const struct uart_device_config xmc4xxx_config_##index = { \ NULL, \ &xmc4xxx_data_##index, \ &xmc4xxx_config_##index, PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &uart_xmc4xxx_driver_api); DT_INST_FOREACH_STATUS_OKAY(XMC4XXX_INIT) diff --git a/drivers/serial/usart_sam.c b/drivers/serial/usart_sam.c index 63e4267388b..2f9f1e87198 100644 --- a/drivers/serial/usart_sam.c +++ b/drivers/serial/usart_sam.c @@ -366,7 +366,7 @@ static const struct uart_driver_api usart_sam_driver_api = { &usart_sam_init, NULL, \ &usart##n##_sam_data, \ &usart##n##_sam_config, PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + CONFIG_SERIAL_INIT_PRIORITY, \ &usart_sam_driver_api); \ \ USART_SAM_CONFIG_FUNC(n) \ diff --git a/samples/boards/sensortile_box/prj.conf b/samples/boards/sensortile_box/prj.conf index 0ea341d2ac8..a5fa96419cb 100644 --- a/samples/boards/sensortile_box/prj.conf +++ b/samples/boards/sensortile_box/prj.conf @@ -29,7 +29,6 @@ CONFIG_USB_DEVICE_PID=0x1234 CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC SensorTile.box" -CONFIG_USB_UART_CONSOLE=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_LINE_CTRL=y CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/subsys/shell/shell_module/overlay-usb.conf b/samples/subsys/shell/shell_module/overlay-usb.conf index 595379fe995..e107d8b0268 100644 --- a/samples/subsys/shell/shell_module/overlay-usb.conf +++ b/samples/subsys/shell/shell_module/overlay-usb.conf @@ -1,5 +1,5 @@ CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="Zephyr USB shell sample" -CONFIG_USB_UART_CONSOLE=y +CONFIG_SHELL_BACKEND_SERIAL_CHECK_DTR=y CONFIG_UART_LINE_CTRL=y CONFIG_SHELL_BACKEND_SERIAL_INIT_PRIORITY=51 diff --git a/samples/subsys/shell/shell_module/src/main.c b/samples/subsys/shell/shell_module/src/main.c index 1555b4f5a86..89eb0b3dc42 100644 --- a/samples/subsys/shell/shell_module/src/main.c +++ b/samples/subsys/shell/shell_module/src/main.c @@ -334,7 +334,7 @@ void main(void) login_init(); } -#if defined(CONFIG_USB_UART_CONSOLE) +#if DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_shell_uart), zephyr_cdc_acm_uart) const struct device *dev; uint32_t dtr = 0; diff --git a/samples/subsys/usb/console/prj.conf b/samples/subsys/usb/console/prj.conf index 0dd080781f1..d47cffdd489 100644 --- a/samples/subsys/usb/console/prj.conf +++ b/samples/subsys/usb/console/prj.conf @@ -2,5 +2,6 @@ CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="Zephyr USB console sample" CONFIG_SERIAL=y +CONFIG_CONSOLE=y +CONFIG_UART_CONSOLE=y CONFIG_UART_LINE_CTRL=y -CONFIG_USB_UART_CONSOLE=y diff --git a/subsys/shell/Kconfig.backends b/subsys/shell/Kconfig.backends index 1a054f6e270..6e902f62408 100644 --- a/subsys/shell/Kconfig.backends +++ b/subsys/shell/Kconfig.backends @@ -73,7 +73,6 @@ config SHELL_BACKEND_SERIAL_RX_POLL_PERIOD config SHELL_BACKEND_SERIAL_CHECK_DTR bool "Check DTR signal before TX" - default y if USB_UART_CONSOLE depends on UART_LINE_CTRL help Check DTR signal before TX. diff --git a/subsys/usb/class/cdc_acm.c b/subsys/usb/class/cdc_acm.c index f91905a05cb..1601bd22480 100644 --- a/subsys/usb/class/cdc_acm.c +++ b/subsys/usb/class/cdc_acm.c @@ -1104,7 +1104,7 @@ static const struct uart_driver_api cdc_acm_driver_api = { \ DEVICE_DT_INST_DEFINE(idx, cdc_acm_init, NULL, \ &cdc_acm_dev_data_##idx, &cdc_acm_config_##idx, \ - POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ + PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &cdc_acm_driver_api); DT_INST_FOREACH_STATUS_OKAY(CDC_ACM_DT_DEVICE_DEFINE); diff --git a/tests/bluetooth/shell/cdc_acm.conf b/tests/bluetooth/shell/cdc_acm.conf index 4d47213402e..bd9204fa006 100644 --- a/tests/bluetooth/shell/cdc_acm.conf +++ b/tests/bluetooth/shell/cdc_acm.conf @@ -1,6 +1,6 @@ CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="Zephyr BT Shell" -CONFIG_USB_UART_CONSOLE=y CONFIG_UART_LINE_CTRL=y +CONFIG_SHELL_BACKEND_SERIAL_CHECK_DTR=y CONFIG_SHELL_BACKEND_SERIAL_INIT_PRIORITY=51 diff --git a/tests/bluetooth/shell/src/main.c b/tests/bluetooth/shell/src/main.c index 7aaca402e96..1cae7fbc13e 100644 --- a/tests/bluetooth/shell/src/main.c +++ b/tests/bluetooth/shell/src/main.c @@ -21,6 +21,7 @@ #include #include #include +#include #include @@ -122,10 +123,20 @@ static void hrs_notify(void) void main(void) { - if (IS_ENABLED(CONFIG_USB_UART_CONSOLE)) { - usb_enable(NULL); - k_sleep(K_SECONDS(2)); +#if DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_shell_uart), zephyr_cdc_acm_uart) + const struct device *dev; + uint32_t dtr = 0; + + dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart)); + if (!device_is_ready(dev) || usb_enable(NULL)) { + return; + } + + while (!dtr) { + uart_line_ctrl_get(dev, UART_LINE_CTRL_DTR, &dtr); + k_sleep(K_MSEC(100)); } +#endif printk("Type \"help\" for supported commands."); printk("Before any Bluetooth commands you must `bt init` to initialize" diff --git a/tests/drivers/console/prj_semihost.conf b/tests/drivers/console/prj_semihost.conf index 1864c4e7507..7adbc210d7b 100644 --- a/tests/drivers/console/prj_semihost.conf +++ b/tests/drivers/console/prj_semihost.conf @@ -2,5 +2,4 @@ CONFIG_TEST=y CONFIG_CONSOLE=y CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n -CONFIG_USB_UART_CONSOLE=n CONFIG_SEMIHOST_CONSOLE=y diff --git a/tests/drivers/uart/uart_basic_api/overlay-usb.conf b/tests/drivers/uart/uart_basic_api/overlay-usb.conf index 1f237687b14..3af32b0ea53 100644 --- a/tests/drivers/uart/uart_basic_api/overlay-usb.conf +++ b/tests/drivers/uart/uart_basic_api/overlay-usb.conf @@ -1,5 +1,4 @@ CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM UART" -CONFIG_USB_UART_CONSOLE=y CONFIG_UART_LINE_CTRL=y CONFIG_TEST_LOGGING_DEFAULTS=n diff --git a/tests/drivers/uart/uart_basic_api/src/main.c b/tests/drivers/uart/uart_basic_api/src/main.c index 753365f9bc0..5f73d91922d 100644 --- a/tests/drivers/uart/uart_basic_api/src/main.c +++ b/tests/drivers/uart/uart_basic_api/src/main.c @@ -58,7 +58,7 @@ void test_uart_pending(void) void test_main(void) { -#if defined(CONFIG_USB_UART_CONSOLE) +#if DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart) const struct device *dev; uint32_t dtr = 0;