]> git.baikalelectronics.ru Git - uboot.git/commit
sunxi: Kconfig: introduce SUNXI_MINIMUM_DRAM_MB
authorAndre Przywara <andre.przywara@arm.com>
Sat, 2 Jul 2022 23:47:20 +0000 (00:47 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Wed, 19 Oct 2022 13:15:02 +0000 (14:15 +0100)
commitffee101b11c448a0e3b3ffb6ca276434b2295ca7
treefdfaea3845af10ba947f134bdf452724b2de3fd8
parent911bdc03134748823a2af895e9aa04dd3eca6c33
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>
Kconfig
arch/arm/mach-sunxi/Kconfig
boot/Kconfig
include/configs/sunxi-common.h