aboutsummaryrefslogtreecommitdiff
path: root/boot/Kconfig
diff options
context:
space:
mode:
authorAndre Przywara2022-07-03 00:47:20 +0100
committerAndre Przywara2022-10-19 14:15:02 +0100
commit1bf98bd4e2d03063cb0fdfbaa20ba2b3ab75205c (patch)
treefdfaea3845af10ba947f134bdf452724b2de3fd8 /boot/Kconfig
parent14b3c6d72a195e5330e5bf688b8d14dc9e3f0ec7 (diff)
sunxi: Kconfig: introduce SUNXI_MINIMUM_DRAM_MB
Traditionally we assumed that every Allwinner board would come with at least 256 MB of DRAM, and set our DRAM layout accordingly. This affected both the default load addresses, but also U-Boot's own address expectations (like being loaded at 160 MB). Some SoCs come with co-packaged DRAM, but only provide 32 or 64MB. So far we special-cased those *chips*, as there was only one chip per DRAM size. However new chips force us to take a more general approach. Introduce a Kconfig symbol, which provides the minimum DRAM size of the board. If nothing else is specified, we use 256 MB, and default to smaller values for those co-packaged SoCs. Then select the different DRAM maps according to this new symbol, so that different SoCs with the same DRAM size can share those definitions. Inspired by an idea from Icenowy. This is just refactoring: compiled for all boards before and after this patch: the binaries were identical. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Diffstat (limited to 'boot/Kconfig')
-rw-r--r--boot/Kconfig4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/Kconfig b/boot/Kconfig
index 6b3b8f072cb..45f86e946cd 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -499,8 +499,8 @@ config SYS_TEXT_BASE
default 0x80800000 if ARCH_OMAP2PLUS || ARCH_K3
default 0x81700000 if MACH_SUNIV
default 0x2a000000 if MACH_SUN9I
- default 0x42e00000 if MACH_SUN8I_V3S
- default 0x4a000000 if ARCH_SUNXI
+ default 0x4a000000 if SUNXI_MINIMUM_DRAM_MB >= 256
+ default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64
hex "Text Base"
help
The address in memory that U-Boot will be running from, initially.