[PATCH v2 5/5] board: verdin-imx8mp: change prints in spl_dram_init function
Marcel Ziswiler
marcel at ziswiler.com
Mon Apr 3 14:01:57 CEST 2023
From: Emanuele Ghidoli <emanuele.ghidoli at toradex.com>
change prints to show which DDR configuration (single/dual rank) is used
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli at toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>
---
Changes in v2:
- Use puts rather than printf in the SPL as suggested by Fabio. Thanks!
board/toradex/verdin-imx8mp/spl.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/board/toradex/verdin-imx8mp/spl.c b/board/toradex/verdin-imx8mp/spl.c
index ab5bcbc0929..73729a42b45 100644
--- a/board/toradex/verdin-imx8mp/spl.c
+++ b/board/toradex/verdin-imx8mp/spl.c
@@ -35,11 +35,17 @@ void spl_dram_init(void)
/*
* Try configuring for dual rank memory falling back to single rank
*/
- if (ddr_init(&dram_timing)) {
- printf("Dual rank failed, attempting single rank configuration.\n");
- lpddr4_single_rank_training_patch();
- ddr_init(&dram_timing);
+ if (!ddr_init(&dram_timing)) {
+ puts("DDR configured as dual rank\n");
+ return;
}
+
+ lpddr4_single_rank_training_patch();
+ if (!ddr_init(&dram_timing)) {
+ puts("DDR configured as single rank\n");
+ return;
+ }
+ puts("DDR configuration failed\n");
}
void spl_board_init(void)
--
2.36.1
More information about the U-Boot
mailing list