drivers: serial: Refactor drivers to use shared init priority Kconfig

Refactors all of the serial drivers to use a shared driver class
initialization priority configuration, CONFIG_SERIAL_INIT_PRIORITY, to
allow configuring serial drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.

The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEVICE to preserve the
existing default initialization priority for most drivers. The one
exception is uart_lpc11u6x.c which previously used
CONFIG_KERNEL_INIT_PRIORITY_OBJECTS.

This change was motivated by an issue on the frdm_k64f board where the
serial driver was incorrectly initialized before the clock control
driver.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
This commit is contained in:
Maureen Helm 2021-10-14 09:38:10 -05:00 committed by Anas Nashif
parent 6d2b91461b
commit ad1450510a
44 changed files with 62 additions and 56 deletions

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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);

View file

@ -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)

View file

@ -559,7 +559,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) \

View file

@ -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

View file

@ -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);

View file

@ -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

View file

@ -447,7 +447,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);
DT_INST_FOREACH_STATUS_OKAY(ESP32_UART_INIT);

View file

@ -550,7 +550,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); \
\
\
@ -608,7 +608,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)

View file

@ -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) \

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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) \

View file

@ -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) \

View file

@ -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) \

View file

@ -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) \

View file

@ -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) \

View file

@ -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

View file

@ -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);

View file

@ -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 */

View file

@ -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)

View file

@ -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);

View file

@ -2003,7 +2003,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) \

View file

@ -1108,7 +1108,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)

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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) \

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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) \

View file

@ -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) \

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -1608,7 +1608,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)

View file

@ -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) \

View file

@ -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) \

View file

@ -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)

View file

@ -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) \