[PATCH 2/6] ram: k3-ddrss: k3-ddrss: Fix updating ddr size with ecc off

Nitin Yadav n-yadav at ti.com
Tue Oct 31 14:28:05 CET 2023


When DDR ECC is off (ecc_reserved_space = 0) k3_ddrss_ddr_fdt_fixup()
doesn't update the DDR size in the memory node of DT. Fix this by
dropping check for ecc_reserved_space to be non zero.

This allows R5 SPL to fixup A53 SPL DT with right DDR size as discovered
during DDR init or based on R5 SPL DT input.

Signed-off-by: Vignesh Raghavendra <vigneshr at ti.com>
Signed-off-by: Nitin Yadav <n-yadav at ti.com>
---
 drivers/ram/k3-ddrss/k3-ddrss.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
index b54557f02c..28129d52a6 100644
--- a/drivers/ram/k3-ddrss/k3-ddrss.c
+++ b/drivers/ram/k3-ddrss/k3-ddrss.c
@@ -664,9 +664,6 @@ int k3_ddrss_ddr_fdt_fixup(struct udevice *dev, void *blob, struct bd_info *bd)
 	u64 size[CONFIG_NR_DRAM_BANKS];
 	int bank;
 
-	if (ddrss->ecc_reserved_space == 0)
-		return 0;
-
 	for (bank = CONFIG_NR_DRAM_BANKS - 1; bank >= 0; bank--) {
 		if (ddrss->ecc_reserved_space > bd->bi_dram[bank].size) {
 			ddrss->ecc_reserved_space -= bd->bi_dram[bank].size;
-- 
2.25.1



More information about the U-Boot mailing list