u-boot/arch/arm/mach-mvebu
Marek Behún a129f64fb0 arm64: mvebu: a37xx: improve code determining memory info structures
Currently on Armada-37xx the mem_map structure is statically defined to
map first 2 GB of memory as RAM region, and system registers and PCIe
region device region.

This is insufficient for when there is more RAM or when for example the
PCIe windows is mapped to another address by the CPU Address Decoder.
In the case when the board has 4 GB RAM, on some boards the ARM Trusted
Firmware can move the PCIe window to another address, in order to
maximize possible usable RAM.

Also the dram_init and dram_init_banksize looks for information in
device-tree, and therefore different device trees are needed for boards
with different RAM sizes.

Therefore we add code that looks at how the ARM Trusted Firmware has
configured the CPU Address Decoder windows, and then we update the
mem_map structure and compute gd->ram_size and gd->bd->bi_dram bank
base addresses and sizes accordingly.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-04-14 13:16:42 +02:00
..
armada8k arm64: mvebu: armada-8k: move dram init code 2020-04-14 13:16:42 +02:00
armada3700 arm64: mvebu: a37xx: improve code determining memory info structures 2020-04-14 13:16:42 +02:00
include/mach arm64: mvebu: a37xx: improve code determining memory info structures 2020-04-14 13:16:42 +02:00
serdes arm: mvebu: fix SerDes table alignment 2020-04-14 13:16:42 +02:00
.gitignore mvebu: select boot device at SoC level 2018-08-06 14:07:23 +02:00
arm64-common.c arm64: mvebu: a37xx: improve code determining memory info structures 2020-04-14 13:16:42 +02:00
cpu.c common: Move some cache and MMU functions out of common.h 2019-12-02 18:23:55 -05:00
dram.c common: Move RAM-sizing functions to init.h 2020-01-17 14:02:35 -05:00
efuse.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig arm: mvebu: clearfog: initial ClearFog Base variant 2020-04-14 13:16:42 +02:00
kwbimage.cfg.in mvebu: select boot device at SoC level 2018-08-06 14:07:23 +02:00
lowlevel_spl.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile arm: mvebu: Avoid generating kwbimage.cfg in the source tree 2019-10-29 16:17:36 -04:00
mbus.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
spl.c arm: mvebu: update RTC values for PCIe memory wrappers 2020-04-14 13:16:42 +02:00
timer.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00