Skip to content

Commit d711d22

Browse files
henrikbrixandersennashif
authored andcommitted
drivers: serial: neorv32: use shared serial driver init priority
Use the shared CONFIG_SERIAL_INIT_PRIORITY for driver initialization priority. Override the default value for the NEORV32 SoC to ensure the serial driver is initialized after the syscon driver by default. Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent efc9cee commit d711d22

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

drivers/serial/Kconfig.neorv32

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,3 @@ config UART_NEORV32
1111
select SERIAL_SUPPORT_INTERRUPT
1212
help
1313
This option enables the UART driver for the NEORV32.
14-
15-
config UART_NEORV32_INIT_PRIORITY
16-
int "Driver inititalization priority"
17-
default 55
18-
depends on UART_NEORV32
19-
help
20-
Device driver initialization priority. This driver must be
21-
initialized after the syscon driver.

drivers/serial/uart_neorv32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ static const struct uart_driver_api neorv32_uart_driver_api = {
540540
&neorv32_uart_##n##_data, \
541541
&neorv32_uart_##n##_config, \
542542
PRE_KERNEL_1, \
543-
CONFIG_UART_NEORV32_INIT_PRIORITY, \
543+
CONFIG_SERIAL_INIT_PRIORITY, \
544544
&neorv32_uart_driver_api)
545545

546546
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(uart0), DT_DRV_COMPAT, okay)

soc/riscv/riscv-privilege/neorv32/Kconfig.defconfig.series

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ config RISCV_GP
2121
config SYSCON
2222
default y
2323

24+
config SERIAL_INIT_PRIORITY
25+
default 55
26+
depends on SERIAL
27+
2428
endif # SOC_SERIES_NEORV32

0 commit comments

Comments
 (0)