@@ -2,6 +2,8 @@
* (C) Copyright 2015
* Kamil Lulko, <rev13@wp.pl>
*
+ * Copyright 2015 Konsulko Group, Matt Porter <mporter@konsulko.com>
+ *
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -10,8 +12,15 @@
#include <serial.h>
#include <asm/arch/stm32.h>
+#if defined(CONFIG_STM32F4)
#define STM32_USART1_BASE (STM32_APB2PERIPH_BASE + 0x1000)
#define RCC_APB2ENR_USART1EN (1 << 4)
+#elif defined(CONFIG_STM32F1)
+#define STM32_USART1_BASE (STM32_APB2PERIPH_BASE + 0x3800)
+#define RCC_APB2ENR_USART1EN (1 << 14)
+#else
+#error STM32 family not supported
+#endif
#define USART_BASE STM32_USART1_BASE
#define RCC_USART_ENABLE RCC_APB2ENR_USART1EN
Add support for the STM32F1 famly to the STM32 serial driver. Signed-off-by: Matt Porter <mporter@konsulko.com> --- Since v1: - Explicitly check for F4/F1 family and error if not set to a supported STM32 family. drivers/serial/serial_stm32.c | 9 +++++++++ 1 file changed, 9 insertions(+)