From aea53f41c1709f8ef76cea90196646f32a0f0204 Mon Sep 17 00:00:00 2001 From: Sylvio Alves Date: Sat, 8 Jan 2022 00:40:47 -0300 Subject: [PATCH] esp32: fix uart and gpio driver priority to enable console Current gpio and uart initialization level is set to PRE_KERNEL_2, which won't let uart_console subsystem to init its hook properly as it has same level. Prioritize uart and gpio so that the console hooks are properly initialized. Signed-off-by: Sylvio Alves --- drivers/gpio/gpio_esp32.c | 2 +- drivers/serial/uart_esp32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio_esp32.c b/drivers/gpio/gpio_esp32.c index 421d0df5287..7776713cf8e 100644 --- a/drivers/gpio/gpio_esp32.c +++ b/drivers/gpio/gpio_esp32.c @@ -446,7 +446,7 @@ static const struct gpio_driver_api gpio_esp32_driver_api = { NULL, \ &gpio_data_##_id, \ &gpio_config_##_id, \ - PRE_KERNEL_2, \ + PRE_KERNEL_1, \ CONFIG_GPIO_INIT_PRIORITY, \ &gpio_esp32_driver_api); diff --git a/drivers/serial/uart_esp32.c b/drivers/serial/uart_esp32.c index ad24c21475f..befcd40ba36 100644 --- a/drivers/serial/uart_esp32.c +++ b/drivers/serial/uart_esp32.c @@ -584,7 +584,7 @@ DEVICE_DT_INST_DEFINE(idx, \ NULL, \ &uart_esp32_data_##idx, \ &uart_esp32_cfg_port_##idx, \ - PRE_KERNEL_2, \ + PRE_KERNEL_1, \ CONFIG_SERIAL_INIT_PRIORITY, \ &uart_esp32_api);