[U-Boot] [PATCH] arm: socfpga: make debug uart work on socfpga_gen5
Simon Goldschmidt
simon.k.r.goldschmidt at gmail.com
Mon Jan 7 19:36:17 UTC 2019
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>
---
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;
}
--
2.17.1
More information about the U-Boot
mailing list