diff --git a/drivers/serial/Kconfig.stm32 b/drivers/serial/Kconfig.stm32 index 24a47d609e0..4a67eb1e93f 100644 --- a/drivers/serial/Kconfig.stm32 +++ b/drivers/serial/Kconfig.stm32 @@ -35,22 +35,6 @@ config UART_STM32_PORT_1_NAME This is the device name for USART1 port, and is included in the device struct. -if !HAS_DTS -config UART_STM32_PORT_1_BAUD_RATE - int "STM32 USART1 Baud Rate" - default 9600 - depends on UART_STM32_PORT_1 - help - The baud rate for USART1 port to be set to at boot. - -config UART_STM32_PORT_1_IRQ_PRI - int "STM32 USART1 Interrupt Priority" - default 0 - depends on UART_STM32_PORT_1 && UART_INTERRUPT_DRIVEN - help - The interrupt priority for USART1 port. - -endif # !HAS_DTS # --- port 2 --- config UART_STM32_PORT_2 @@ -69,23 +53,6 @@ config UART_STM32_PORT_2_NAME This is the device name for USART2 port, and is included in the device struct. -if !HAS_DTS -config UART_STM32_PORT_2_BAUD_RATE - int "STM32 USART2 Baud Rate" - default 9600 - depends on UART_STM32_PORT_2 - help - The baud rate for USART2 port to be set to at boot. - -config UART_STM32_PORT_2_IRQ_PRI - int "STM32 USART2 Interrupt Priority" - default 0 - depends on UART_STM32_PORT_2 && UART_INTERRUPT_DRIVEN - help - The interrupt priority for USART2 port. - -endif # !HAS_DTS - # --- port 3 --- config UART_STM32_PORT_3 @@ -104,21 +71,4 @@ config UART_STM32_PORT_3_NAME This is the device name for USART3 port, and is included in the device struct. -if !HAS_DTS -config UART_STM32_PORT_3_BAUD_RATE - int "STM32 USART3 Baud Rate" - default 9600 - depends on UART_STM32_PORT_3 - help - The baud rate for USART3 port to be set to at boot. - -config UART_STM32_PORT_3_IRQ_PRI - int "STM32 USART3 Interrupt Priority" - default 0 - depends on UART_STM32_PORT_3 && UART_INTERRUPT_DRIVEN - help - The interrupt priority for USART3 port. - -endif # !HAS_DTS - endif # UART_STM32 diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c index f036180411c..e0bbb80ecd7 100644 --- a/drivers/serial/uart_stm32.c +++ b/drivers/serial/uart_stm32.c @@ -36,12 +36,6 @@ #define UART_STRUCT(dev) \ ((USART_TypeDef *)(DEV_CFG(dev))->uconf.base) -#ifndef CONFIG_HAS_DTS -#define CONFIG_UART_STM32_PORT_1_BASE_ADDRESS USART1_BASE -#define CONFIG_UART_STM32_PORT_2_BASE_ADDRESS USART2_BASE -#define CONFIG_UART_STM32_PORT_3_BASE_ADDRESS USART3_BASE -#endif - #define TIMEOUT 1000 static int uart_stm32_poll_in(struct device *dev, unsigned char *c) @@ -366,18 +360,6 @@ DEVICE_AND_API_INIT(uart_stm32_1, CONFIG_UART_STM32_PORT_1_NAME, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_stm32_irq_config_func_1(struct device *dev) { - -#ifndef CONFIG_HAS_DTS -#ifdef CONFIG_SOC_SERIES_STM32F1X -#define PORT_1_IRQ STM32F1_IRQ_USART1 -#elif CONFIG_SOC_SERIES_STM32F3X -#define PORT_1_IRQ STM32F3_IRQ_USART1 -#elif CONFIG_SOC_SERIES_STM32F4X -#define PORT_1_IRQ STM32F4_IRQ_USART1 -#elif CONFIG_SOC_SERIES_STM32L4X -#define PORT_1_IRQ STM32L4_IRQ_USART1 -#endif -#endif IRQ_CONNECT(PORT_1_IRQ, CONFIG_UART_STM32_PORT_1_IRQ_PRI, uart_stm32_isr, DEVICE_GET(uart_stm32_1), @@ -430,18 +412,6 @@ DEVICE_AND_API_INIT(uart_stm32_2, CONFIG_UART_STM32_PORT_2_NAME, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_stm32_irq_config_func_2(struct device *dev) { - -#ifndef CONFIG_HAS_DTS -#ifdef CONFIG_SOC_SERIES_STM32F1X -#define PORT_2_IRQ STM32F1_IRQ_USART2 -#elif CONFIG_SOC_SERIES_STM32F3X -#define PORT_2_IRQ STM32F3_IRQ_USART2 -#elif CONFIG_SOC_SERIES_STM32F4X -#define PORT_2_IRQ STM32F4_IRQ_USART2 -#elif CONFIG_SOC_SERIES_STM32L4X -#define PORT_2_IRQ STM32L4_IRQ_USART2 -#endif -#endif IRQ_CONNECT(PORT_2_IRQ, CONFIG_UART_STM32_PORT_2_IRQ_PRI, uart_stm32_isr, DEVICE_GET(uart_stm32_2), @@ -493,17 +463,6 @@ DEVICE_AND_API_INIT(uart_stm32_3, CONFIG_UART_STM32_PORT_3_NAME, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_stm32_irq_config_func_3(struct device *dev) { -#ifndef CONFIG_HAS_DTS -#ifdef CONFIG_SOC_SERIES_STM32F1X -#define PORT_3_IRQ STM32F1_IRQ_USART3 -#elif CONFIG_SOC_SERIES_STM32F3X -#define PORT_3_IRQ STM32F3_IRQ_USART3 -#elif CONFIG_SOC_SERIES_STM32F4X -#define PORT_3_IRQ STM32F4_IRQ_USART3 -#elif CONFIG_SOC_SERIES_STM32L4X -#define PORT_3_IRQ STM32L4_IRQ_USART3 -#endif -#endif IRQ_CONNECT(PORT_3_IRQ, CONFIG_UART_STM32_PORT_3_IRQ_PRI, uart_stm32_isr, DEVICE_GET(uart_stm32_3),