sunxi: h6/h616: Reuse common DRAM infrastructure
authorJernej Skrabec <jernej.skrabec@gmail.com>
Fri, 11 Apr 2025 16:14:39 +0000 (18:14 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 28 Apr 2025 18:45:43 +0000 (12:45 -0600)
commit923ad56374129cdb075175f42ecc5997374870bb
treef375942ba9a7915401344196fe4a3f22e8ffc6b3
parent7a087f5ddddf85fc7789d15c77cc8aad533bfcee
sunxi: h6/h616: Reuse common DRAM infrastructure

H616 rank and size detection code is superior to the H6. Nevertheless,
they are structurally the same. Split functions from H616 into new file
and reuse them in H6 DRAM driver too. This should also fix some bugs for
H6 too, like incorrect DRAM size detection.

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
[Andre: back out panic if test fails to allow 2^11 columns]
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/include/asm/arch-sunxi/dram_dw_helpers.h [new file with mode: 0644]
arch/arm/mach-sunxi/Makefile
arch/arm/mach-sunxi/dram_dw_helpers.c [new file with mode: 0644]
arch/arm/mach-sunxi/dram_sun50i_h6.c
arch/arm/mach-sunxi/dram_sun50i_h616.c