@@ -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,13 @@
#include <serial.h>
#include <asm/arch/stm32.h>
+#ifdef CONFIG_STM32F4
#define STM32_USART1_BASE (STM32_APB2PERIPH_BASE + 0x1000)
#define RCC_APB2ENR_USART1EN (1 << 4)
+#else
+#define STM32_USART1_BASE (STM32_APB2PERIPH_BASE + 0x3800)
+#define RCC_APB2ENR_USART1EN (1 << 14)
+#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> --- drivers/serial/serial_stm32.c | 7 +++++++ 1 file changed, 7 insertions(+)