[U-Boot] [PATCH 5/6] serial: stm32: add stm32f1 support

Matt Porter mporter at konsulko.com
Tue Apr 14 20:07:21 CEST 2015


Add support for the STM32F1 famly to the STM32 serial driver.

Signed-off-by: Matt Porter <mporter at konsulko.com>
---
 drivers/serial/serial_stm32.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 3c80096..a0397e1 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -2,6 +2,8 @@
  * (C) Copyright 2015
  * Kamil Lulko, <rev13 at wp.pl>
  *
+ * Copyright 2015 Konsulko Group, Matt Porter <mporter at 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
-- 
2.1.0



More information about the U-Boot mailing list