From: Simon Goldschmidt Date: Mon, 13 Aug 2018 09:33:47 +0200 Subject: [U-Boot] [PATCH v3 4/8] arm: socfpga: cyclone5: handle debug uart In-Reply-To: <20180813073351.29293-1-simon.k.r.goldschmidt@gmail.com> References: <20180813073351.29293-1-simon.k.r.goldschmidt@gmail.com> Message-ID: <20180813073351.29293-5-simon.k.r.goldschmidt@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de If CONFIG_DEBUG_UART is enabled, correctly initialize the debug uart before console is initialized to debug early boot problems in SPL. Signed-off-by: Simon Goldschmidt --- Changes in v3: None Changes in v2: - don't change printf() to debug() in reset_manager_gen5.c socfpga_bridges_reset() arch/arm/mach-socfpga/spl_gen5.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c index 0d5526656d..0e685f6ee5 100644 --- a/arch/arm/mach-socfpga/spl_gen5.c +++ b/arch/arm/mach-socfpga/spl_gen5.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -153,6 +154,11 @@ void board_init_f(ulong dummy) /* unfreeze / thaw all IO banks */ sys_mgr_frzctrl_thaw_req(); +#ifdef CONFIG_DEBUG_UART + socfpga_per_reset(SOCFPGA_RESET(UART0), 0); + debug_uart_init(); +#endif + ret = spl_early_init(); if (ret) { debug("spl_early_init() failed: %d\n", ret); -- 2.17.1