Skip to contentSkip to conversation

board: verdin-am62: add dram_init_banksize

PATCH In review Stefan Eichenberger 3 participants 6 messages Feb 10, 2025 – Feb 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: verdin-am62: add dram_init_banksize

From: Stefan Eichenberger <[email protected]>

Add the dram_init_banksize function to the board file to properly set DRAM memory sizes during boot.

The commit bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled") relocated the dram_init_banksize function from architecture specific initialization to the TI board initialization code. As a result, boards relying on the previous setup now require this function to be defined within their board file to handle DRAM sizing correctly.

Without this function defined the following error appears during boot:

    ERROR: Failed to allocate 0x1000 bytes below 0x0.
Fixes bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled")
---
 board/toradex/verdin-am62/verdin-am62.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
board/toradex/verdin-am62/verdin-am62.c +11 -0
index e948fc16ba9..b80b39b6767 100644
@@ -35,6 +35,17 @@ int dram_init(void)
 	return 0;
 }
 
+int dram_init_banksize(void)
+{
+	s32 ret;
+
+	ret = fdtdec_setup_memory_banksize();
+	if (ret)
+		printf("Error setting up memory banksize. %d\n", ret);
+
+	return ret;
+}
+
 /*
  * Avoid relocated U-Boot clash with Linux reserved-memory on 512 MB SoM
  */
Signature · 1 line
2.45.2
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Stefan Eichenberger

From: Stefan Eichenberger <[email protected]>

Add the dram_init_banksize function to the board file to properly set DRAM memory sizes during boot.

The commit bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled") relocated the dram_init_banksize function from architecture specific initialization to the TI board initialization code. As a result, boards relying on the previous setup now require this function to be defined within their board file to handle DRAM sizing correctly.

Quoted 5 lines

Without this function defined the following error appears during boot:

    ERROR: Failed to allocate 0x1000 bytes below 0x0.
Fixes bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled")
#2 lore raw
In reply to Stefan Eichenberger
Quoted 11 lines · Stefan Eichenberger

Add the dram_init_banksize function to the board file to properly set DRAM memory sizes during boot.

The commit bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled") relocated the dram_init_banksize function from architecture specific initialization to the TI board initialization code. As a result, boards relying on the previous setup now require this function to be defined within their board file to handle DRAM sizing correctly.

[...]

Applied to u-boot/next, thanks!

Signature · 1 line
Tom
#3 lore raw

Hello Tom,

Quoted 12 lines · Tom Rini
Quoted 10 lines · Stefan Eichenberger

Add the dram_init_banksize function to the board file to properly set DRAM memory sizes during boot.

The commit bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled") relocated the dram_init_banksize function from architecture specific initialization to the TI board initialization code. As a result, boards relying on the previous setup now require this function to be defined within their board file to handle DRAM sizing correctly.

Quoted 3 lines
Quoted 1 line

[...]

Applied to u-boot/next, thanks!

This fix is needed in master, without it verdin-am62 is not booting at all, can you pick it also in master?

We should have been more explicit on this, next time we'll do better.

Thanks,
Francesco

#4 lore raw
Quoted 15 lines · Francesco Dolcini

Hello Tom,

Quoted 12 lines · Tom Rini
Quoted 10 lines · Stefan Eichenberger

Add the dram_init_banksize function to the board file to properly set DRAM memory sizes during boot.

The commit bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled") relocated the dram_init_banksize function from architecture specific initialization to the TI board initialization code. As a result, boards relying on the previous setup now require this function to be defined within their board file to handle DRAM sizing correctly.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

[...]

Applied to u-boot/next, thanks!

This fix is needed in master, without it verdin-am62 is not booting at all, can you pick it also in master?

We should have been more explicit on this, next time we'll do better.

Yes, I'll take care of it, thanks for explaining.

Signature · 1 line
Tom
#5 lore raw
In reply to Stefan Eichenberger
Quoted 11 lines · Stefan Eichenberger

Add the dram_init_banksize function to the board file to properly set DRAM memory sizes during boot.

The commit bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled") relocated the dram_init_banksize function from architecture specific initialization to the TI board initialization code. As a result, boards relying on the previous setup now require this function to be defined within their board file to handle DRAM sizing correctly.

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom