diff options
author | Tom Rini <trini@konsulko.com> | 2022-04-05 11:27:39 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-05 11:27:39 -0400 |
commit | 037ef53cf01c522073a0a930c84c3ca858f032e1 (patch) | |
tree | aa6ce3d6777690251a57e7bb85c2865005046b30 /board/xilinx/versal/board.c | |
parent | 4de720e98d552dfda9278516bf788c4a73b3e56f (diff) | |
parent | a7379ba6505d70d887951be9ebb3f47e3792c708 (diff) |
Merge tag 'xilinx-for-v2022.07-rc1-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
Xilinx changes for v2022.07-rc1 v2
xilinx:
- Allow booting bigger kernels till 100MB
zynqmp:
- DT updates (reset IDs)
- Remove unneeded low level uart initialization from psu_init*
- Enable PWM features
- Add support for 1EG device
serial_zynq:
- Change fifo behavior in DEBUG mode
zynq_sdhci:
- Fix BASECLK setting calculation
clk_zynqmp:
- Add support for showing video clock
gpio:
- Update slg driver to handle DT flags
net:
- Update ethernet_id code to support also DM_ETH_PHY
- Add support for DM_ETH_PHY in gem driver
- Enable dynamic mode for SGMII config in gem driver
pwm:
- Add driver for cadence PWM
versal:
- Add support for reserved memory
firmware:
- Handle PD enabling for SPL
- Add support for IOUSLCR SGMII configurations
include:
- Sync phy.h with Linux
- Update xilinx power domain dt binding headers
Diffstat (limited to 'board/xilinx/versal/board.c')
-rw-r--r-- | board/xilinx/versal/board.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index 299e128f7b..9940f2aeb3 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -9,6 +9,7 @@ #include <env.h> #include <fdtdec.h> #include <init.h> +#include <image.h> #include <env_internal.h> #include <log.h> #include <malloc.h> @@ -249,6 +250,25 @@ int dram_init(void) return 0; } +ulong board_get_usable_ram_top(ulong total_size) +{ + phys_size_t size; + phys_addr_t reg; + struct lmb lmb; + + /* found enough not-reserved memory to relocated U-Boot */ + lmb_init(&lmb); + lmb_add(&lmb, gd->ram_base, gd->ram_size); + boot_fdt_add_mem_rsv_regions(&lmb, (void *)gd->fdt_blob); + size = ALIGN(CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE); + reg = lmb_alloc(&lmb, size, MMU_SECTION_SIZE); + + if (!reg) + reg = gd->ram_top - size; + + return reg + size; +} + void reset_cpu(void) { } |