mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 11:04:20 +00:00
fix(xilinx): update dtb when dtb address and tf-a ddr flow is used
Memory reservation in dtb will be done only when TF-A runs from ddr and dtb load address is provided. Otherwise prepare_dtb will simply return. Empty definition of prepare_dtb is removed. Signed-off-by: Amit Nagal <amit.nagal@amd.com> Change-Id: Ie8a3ec51d60a7389831cfe6a112f722777930623
This commit is contained in:
parent
56afab73a8
commit
fdf8f929df
1 changed files with 8 additions and 7 deletions
|
@ -12,11 +12,17 @@
|
|||
#include <plat_fdt.h>
|
||||
#include <platform_def.h>
|
||||
|
||||
#if (defined(XILINX_OF_BOARD_DTB_ADDR) && !IS_TFA_IN_OCM(BL31_BASE))
|
||||
void prepare_dtb(void)
|
||||
{
|
||||
void *dtb = (void *)XILINX_OF_BOARD_DTB_ADDR;
|
||||
void *dtb;
|
||||
int ret;
|
||||
#if !defined(XILINX_OF_BOARD_DTB_ADDR)
|
||||
return;
|
||||
#else
|
||||
dtb = (void *)XILINX_OF_BOARD_DTB_ADDR;
|
||||
#endif
|
||||
if (IS_TFA_IN_OCM(BL31_BASE))
|
||||
return;
|
||||
|
||||
/* Return if no device tree is detected */
|
||||
if (fdt_check_header(dtb) != 0) {
|
||||
|
@ -45,8 +51,3 @@ void prepare_dtb(void)
|
|||
clean_dcache_range((uintptr_t)dtb, fdt_blob_size(dtb));
|
||||
INFO("Changed device tree to advertise PSCI and reserved memories.\n");
|
||||
}
|
||||
#else
|
||||
void prepare_dtb(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue