summaryrefslogtreecommitdiff
path: root/arch/arm/include/debug
diff options
context:
space:
mode:
authorErwan Le Ray <erwan.leray@st.com>2020-02-03 15:04:22 +0100
committerAlexandre Torgue <alexandre.torgue@st.com>2020-03-13 17:05:07 +0100
commit79d5cfd19d261b0e64569649b04867c8dbdcd8a9 (patch)
tree8d935fb03acc929cdefad9fc28e3ea5043f55caa /arch/arm/include/debug
parentbb6d3fb354c5ee8d6bde2d576eb7220ea09862b9 (diff)
ARM: debug: stm32: add UART early console configuration for STM32F4
Early console is hardcoded on USART1 in current implementation. With this patch, default UART instance is USART1, but other UART instances can be configured by setting physical and virtual base addresses in menuconfig. Signed-off-by: Erwan Le Ray <erwan.leray@st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Diffstat (limited to 'arch/arm/include/debug')
-rw-r--r--arch/arm/include/debug/stm32.S6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/include/debug/stm32.S b/arch/arm/include/debug/stm32.S
index 1abb32f685fd..b0c7034b33d9 100644
--- a/arch/arm/include/debug/stm32.S
+++ b/arch/arm/include/debug/stm32.S
@@ -4,8 +4,6 @@
* Author: Gerald Baeza <gerald.baeza@st.com> for STMicroelectronics.
*/
-#define STM32_UART_BASE 0x40011000 /* USART1 */
-
#ifdef CONFIG_STM32F4_DEBUG_UART
#define STM32_USART_SR_OFF 0x00
#define STM32_USART_TDR_OFF 0x04
@@ -20,8 +18,8 @@
#define STM32_USART_TXE (1 << 7) /* Tx data reg empty */
.macro addruart, rp, rv, tmp
- ldr \rp, =STM32_UART_BASE @ physical base
- ldr \rv, =STM32_UART_BASE @ virt base /* NoMMU */
+ ldr \rp, =CONFIG_DEBUG_UART_PHYS @ physical base
+ ldr \rv, =CONFIG_DEBUG_UART_VIRT @ virt base
.endm
.macro senduart,rd,rx