diff options
author | Michal Simek <michal.simek@xilinx.com> | 2020-09-03 12:24:28 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2020-10-27 10:13:32 +0300 |
commit | caa7fc2c57750f323d53aef38c7ee2e01898c4ba (patch) | |
tree | 37aa0d0239f56f903b70d89d27925ae3b595c794 /common/spl/spl_fit.c | |
parent | ea836be1e7b9e5a88637a87cf7219f96761d1b70 (diff) | |
download | u-boot-caa7fc2c57750f323d53aef38c7ee2e01898c4ba.tar.xz |
spl: Use standard FIT entries
SPL is creating fit-images DT node when loadables are recorded in selected
configuration. Entries which are created are using entry-point and
load-addr property names. But there shouldn't be a need to use non standard
properties because entry/load are standard FIT properties. But using
standard FIT properties enables option to use generic FIT functions to
descrease SPL size. Here is result for ZynqMP virt configuration:
xilinx_zynqmp_virt: spl/u-boot-spl:all -82 spl/u-boot-spl:rodata -22 spl/u-boot-spl:text -60
The patch causes change in run time fit image record.
Before:
fit-images {
uboot {
os = "u-boot";
type = "firmware";
size = <0xfd520>;
entry-point = <0x8000000>;
load-addr = <0x8000000>;
};
};
After:
fit-images {
uboot {
os = "u-boot";
type = "firmware";
size = <0xfd520>;
entry = <0x8000000>;
load = <0x8000000>;
};
};
Replacing calling fdt_getprop_u32() by fit_image_get_entry/load() also
enables support for reading entry/load properties recorded in 64bit format.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/spl/spl_fit.c')
-rw-r--r-- | common/spl/spl_fit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index fd6086a65c..f5109e86d1 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -332,9 +332,15 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, } if (image_info) { + ulong entry_point; + image_info->load_addr = load_addr; image_info->size = length; - image_info->entry_point = fdt_getprop_u32(fit, node, "entry"); + + if (!fit_image_get_entry(fit, node, &entry_point)) + image_info->entry_point = entry_point; + else + image_info->entry_point = FDT_ERROR; } return 0; |