From patchwork Fri Mar 20 08:03:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 243994 List-Id: U-Boot discussion From: michal.simek at xilinx.com (Michal Simek) Date: Fri, 20 Mar 2020 09:03:47 +0100 Subject: [PATCH 1/2] arm64: zynqmp: Add support for debug uart also for U-Boot proper Message-ID: <49ecdd5df5f97e1f2eff8b8335c0068cf6358261.1584691425.git.michal.simek@xilinx.com> board_early_init_f() is the right location where debug uart can be configurated (after MIO initialization). The patch is taking this call from SPL to also make it available for U-Boot proper. Signed-off-by: Michal Simek --- arch/arm/mach-zynqmp/spl.c | 6 ------ board/xilinx/zynqmp/zynqmp.c | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c index b3830182e250..c53945e57f39 100644 --- a/arch/arm/mach-zynqmp/spl.c +++ b/arch/arm/mach-zynqmp/spl.c @@ -6,7 +6,6 @@ */ #include -#include #include #include @@ -21,11 +20,6 @@ void board_init_f(ulong dummy) board_early_init_f(); board_early_init_r(); -#ifdef CONFIG_DEBUG_UART - /* Uart debug for sure */ - debug_uart_init(); - puts("Debug uart enabled\n"); /* or printch() */ -#endif /* Delay is required for clocks to be propagated */ udelay(1000000); } diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index c6c55caa1ce0..04fd3bd0a443 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -319,13 +320,21 @@ static char *zynqmp_get_silicon_idcode_name(void) int board_early_init_f(void) { - int ret = 0; - #if defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED) + int ret; + ret = psu_init(); + if (ret) + return ret; #endif - return ret; +#ifdef CONFIG_DEBUG_UART + /* Uart debug for sure */ + debug_uart_init(); + puts("Debug uart enabled\n"); /* or printch() */ +#endif + + return 0; } static int multi_boot(void)