airoha: rework RAM size handling to support multiple RAM size
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 10 Sep 2025 08:37:35 +0000 (10:37 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 7 Oct 2025 23:11:49 +0000 (17:11 -0600)
commit726404a66c773d8ee1b2d25725f3a6ef470f1b3e
tree1a21f3c391c1451cb2301b86a9a19eda327cb0da
parent6f180984700fdff706e3a0ed6d84ce7ca50f17fc
airoha: rework RAM size handling to support multiple RAM size

There are multiple version of the same reference board with different
RAM size and it's not enough to base the RAM size entirely from DT. To
better support it use the get_ram_size way to scan for the actual RAM
size of Airoha SoC and increase the size of the memory map.

Also rework the memory map to account for 2 memory map. The first one of
2GB for 32bit DMA and for safe usage of U-Boot. The second one for the
rest of the RAM since up to 8GB are supported.

Reviewed-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
arch/arm/mach-airoha/an7581/init.c