[PATCH 09/10] board: ti: am62ax: evm: Fixup DDR size when ECC is enabled

Santhosh Kumar K s-k6 at ti.com
Wed Jan 31 07:02:12 CET 2024


Call k3-ddrss driver through fixup_ddr_driver_for_ecc() to fixup the
device tree and resize the available amount of DDR, if ECC is enabled.
Otherwise, fixup the device tree using the regular
fdt_fixup_memory_banks().

Signed-off-by: Santhosh Kumar K <s-k6 at ti.com>
---
 board/ti/am62ax/evm.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/board/ti/am62ax/evm.c b/board/ti/am62ax/evm.c
index cd3360a43029..5ed47bb86170 100644
--- a/board/ti/am62ax/evm.c
+++ b/board/ti/am62ax/evm.c
@@ -13,17 +13,19 @@
 #include <fdt_support.h>
 #include <spl.h>
 
+#include "../common/k3-ddr-init.h"
+
 int board_init(void)
 {
 	return 0;
 }
 
-int dram_init(void)
-{
-	return fdtdec_setup_mem_size_base();
-}
-
-int dram_init_banksize(void)
+#if defined(CONFIG_SPL_BUILD)
+void spl_perform_fixups(struct spl_image_info *spl_image)
 {
-	return fdtdec_setup_memory_banksize();
+	if (IS_ENABLED(CONFIG_K3_INLINE_ECC))
+		fixup_ddr_driver_for_ecc(spl_image);
+	else
+		fixup_memory_node(spl_image);
 }
+#endif
-- 
2.34.1



More information about the U-Boot mailing list