Skip to contentSkip to conversation

sunxi: a523: Re-use H6/H616 DRAM size detection method

PATCH In review Andre Przywara 3 participants 3 messages Oct 20, 2025

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

PATCH 1/1 sunxi: a523: Re-use H6/H616 DRAM size detection method

The H6 and H616 DRAM initialisation code recently gained a joint and improved size detection routine, which helped to avoid the occasional DRAM size misdetection.

Use the same code for the A523 DRAM initialisation as well, which suffers from the same misdetection at times.

---
 arch/arm/mach-sunxi/Makefile           |  2 +-
 arch/arm/mach-sunxi/dram_sun55i_a523.c | 82 +-------------------------
 2 files changed, 4 insertions(+), 80 deletions(-)
arch/arm/mach-sunxi/Makefile +1 -1
index 579530f27e3..9c79b55abf3 100644
@@ -47,6 +47,6 @@ obj-$(CONFIG_DRAM_SUN50I_H616)	+= dram_sun50i_h616.o dram_dw_helpers.o
 obj-$(CONFIG_DRAM_SUN50I_H616)	+= dram_timings/
 obj-$(CONFIG_DRAM_SUN50I_A133)	+= dram_sun50i_a133.o
 obj-$(CONFIG_DRAM_SUN50I_A133)	+= dram_timings/
-obj-$(CONFIG_MACH_SUN55I_A523)	+= dram_sun55i_a523.o
+obj-$(CONFIG_MACH_SUN55I_A523)	+= dram_sun55i_a523.o dram_dw_helpers.o
 obj-$(CONFIG_DRAM_SUN55I_A523)	+= dram_timings/
 endif
arch/arm/mach-sunxi/dram_sun55i_a523.c +3 -79

100 lines not on this page · raw message

Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Dne ponedeljek, 20. oktober 2025 ob 16:26:22 Srednjeevropski poletni čas je Andre Przywara napisal(a):

Quoted 8 lines

The H6 and H616 DRAM initialisation code recently gained a joint and improved size detection routine, which helped to avoid the occasional DRAM size misdetection.

Use the same code for the A523 DRAM initialisation as well, which suffers from the same misdetection at times.

I was a bit perplexed why code size detection doesn't work right with current master branch. This explains everything.

Best regards,
Jernej

maintainer Tested-by on v1 1/1
#2 lore raw
In reply to Andre Przywara
Quoted 9 lines · Andre Przywara

The H6 and H616 DRAM initialisation code recently gained a joint and improved size detection routine, which helped to avoid the occasional DRAM size misdetection.

Use the same code for the A523 DRAM initialisation as well, which suffers from the same misdetection at times.

Previously I would get 8GB on my 4GB Cubie A5E every couple of reboots. With this change that hasn't happened. Consider this a not so scientific test.