Skip to contentSkip to conversation

arm: mediatek: fix ram init for mt7622 (decrease to 1G)

PATCH In review Frank Wunderlich 3 participants 3 messages Jun 15, 2024 – Jun 28, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mediatek: fix ram init for mt7622 (decrease to 1G)

From: Frank Wunderlich <[email protected]>

RAM init on mt7622 based bananapi R64 is broken since v2023.10.

Increasing the mem-map does not help here, so i reduced the maximum available ram in get_ram_size call from 2G to 1G (board has only 1G).

Fixes 5fd6d4c7b3ad ("arm: mediatek: retrieve ram_base from dts node for armv8 platform")
---
 arch/arm/mach-mediatek/mt7622/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mediatek/mt7622/init.c +1 -1
index 00d3eb9ce7a4..1f32ff947dcd 100644
@@ -28,7 +28,7 @@ int dram_init(void)
 	if (ret)
 		return ret;
 
-	gd->ram_size = get_ram_size((void *)gd->ram_base, SZ_2G);
+	gd->ram_size = get_ram_size((void *)gd->ram_base, SZ_1G);
 
 	return 0;
 }
Signature · 1 line
2.34.1
#1 lore raw

Am 15. Juni 2024 11:34:56 MESZ schrieb Frank Wunderlich <[email protected]>:

Quoted 18 lines

From: Frank Wunderlich <[email protected]>

RAM init on mt7622 based bananapi R64 is broken since v2023.10.

Increasing the mem-map does not help here, so i reduced the maximum available ram in get_ram_size call from 2G to 1G (board has only 1G).

Fixes 5fd6d4c7b3ad ("arm: mediatek: retrieve ram_base from dts node for armv8 platform")

---
arch/arm/mach-mediatek/mt7622/init.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mediatek/mt7622/init.c +0 -0
index 00d3eb9ce7a4..1f32ff947dcd 100644

arch/arm/mach-mediatek/mt7622/init.c int dram_init(void) · line 34

Quoted 8 lines
arch/arm/mach-mediatek/mt7622/init.c +1 -1
@@ -28,7 +28,7 @@ int dram_init(void)
 	if (ret)
 		return ret;
 
-	gd->ram_size = get_ram_size((void *)gd->ram_base, SZ_2G);
+	gd->ram_size = get_ram_size((void *)gd->ram_base, SZ_1G);
 
 	return 0;
 }

Hi Tom,

Can you pick this fix for 2024.7?

regards Frank

#2 lore raw
In reply to Frank Wunderlich
Quoted 6 lines · Frank Wunderlich

RAM init on mt7622 based bananapi R64 is broken since v2023.10.

Increasing the mem-map does not help here, so i reduced the maximum available ram in get_ram_size call from 2G to 1G (board has only 1G).

Applied to u-boot/master, thanks!

Signature · 1 line
Tom