diff options
author | Michal Simek | 2022-02-17 14:28:41 +0100 |
---|---|---|
committer | Michal Simek | 2022-02-21 13:20:24 +0100 |
commit | 05f0f269b7a6e5c9b65e88bb8b691e28cb49da84 (patch) | |
tree | 841bb18e9f5cc8930c876001514a3b3d2d1c1444 /arch/arm | |
parent | 83d2941fe9750f7d98d560d7782edcf31b574d3d (diff) |
ARM: zynq: Fix debug uart initialization
The commit 0dba45864b2a ("arm: Init the debug UART") calls
debug_uart_init() from crt0.S but it won't work because SOC is not
configured yet. That's why create board_debug_uart_init() which calls
ps7_init() earlier before the first access to UART.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/18e67e02a0c7190839a1ef3a11f3fd6babcf34cc.1645104518.git.michal.simek@xilinx.com
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-zynq/spl.c | 15 |
2 files changed, 10 insertions, 6 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ae5002c9e4d..c5b21cd06e7 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1157,6 +1157,7 @@ config ARCH_ZYNQ select CLK select CLK_ZYNQ select CPU_V7A + select DEBUG_UART_BOARD_INIT if SPL && DEBUG_UART select DM select DM_ETH if NET select DM_MMC if MMC diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c index b1a5184b689..fea1c9b12ad 100644 --- a/arch/arm/mach-zynq/spl.c +++ b/arch/arm/mach-zynq/spl.c @@ -16,17 +16,20 @@ #include <asm/arch/sys_proto.h> #include <asm/arch/ps7_init_gpl.h> +#if defined(CONFIG_DEBUG_UART_BOARD_INIT) +void board_debug_uart_init(void) +{ + ps7_init(); +} +#endif + void board_init_f(ulong dummy) { +#if !defined(CONFIG_DEBUG_UART_BOARD_INIT) ps7_init(); +#endif arch_cpu_init(); - -#ifdef CONFIG_DEBUG_UART - /* Uart debug for sure */ - debug_uart_init(); - puts("Debug uart enabled\n"); /* or printch() */ -#endif } #ifdef CONFIG_SPL_BOARD_INIT |