[U-Boot] [PATCH] arm: socfpga: make debug uart work on socfpga_gen5
Marek Vasut
marex at denx.de
Mon Jan 7 20:19:32 UTC 2019
On 1/7/19 8:36 PM, Simon Goldschmidt wrote:
> When debug UART is enabled on socfpga_gen5, the debug uart driver hangs
> in an endless loop because 'socfpga_bridges_reset' calls printf before
> the debug UART is initialized.
>
> After the generic fix for this in the UART driver did not work due to
> portability issues, let's just drop this printf statement when called
> from SPL with debug UART enabled.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
Can we have an un-portable fix which at least works on SoCFPGA ? :)
> ---
>
> This is about my fourth try to get the debug uart usable on socfpga gen5.
> Hope this time I'll make it :-)
> It's really annoying to have local diffs only for enabling the debug uart!
>
> arch/arm/mach-socfpga/reset_manager_gen5.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/mach-socfpga/reset_manager_gen5.c b/arch/arm/mach-socfpga/reset_manager_gen5.c
> index 25baef79bc..39d8fbed94 100644
> --- a/arch/arm/mach-socfpga/reset_manager_gen5.c
> +++ b/arch/arm/mach-socfpga/reset_manager_gen5.c
> @@ -90,7 +90,10 @@ void socfpga_bridges_reset(int enable)
> if (!fpgamgr_test_fpga_ready()) {
> /* FPGA not ready, do nothing. We allow system to boot
> * without FPGA ready. So, return 0 instead of error. */
> +#if !defined CONFIG_SPL_BUILD || !defined CONFIG_DEBUG_UART
> + /* In SPL, this is called before debug-uart init... */
> printf("%s: FPGA not ready, aborting.\n", __func__);
> +#endif
> return;
> }
>
>
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list