mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-24 10:52:13 +01:00
For armv8, U-Boot uses a static map defined as 'mem_map' for configuring the MMU as part of mmu_setup. But since the exact configuration of memory banks might not be known at build time, many platforms such as imx9, versal2 etc. utilize gd->bd->bi_dram to configure the static map at runtime. Therefore this patch adds a new API mem_map_from_dram_banks that modifies the static map in a similar way. Allowing the caller to map all dram banks by just passing the index to last entry in their mem_map and it's length. Reviewed-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Anshul Dalal <anshuld@ti.com> Tested-by: Wadim Egorov <w.egorov@phytec.de>