spl: fit: release and run mcu address depended on entry_point

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibbd28c604c6f6bf558f74c4b5a8064d894492015
This commit is contained in:
Jason Zhu 2020-06-23 15:02:05 +08:00 committed by Jianhong Chen
parent 5b69ab5af5
commit 9a65720b98
1 changed files with 6 additions and 3 deletions

View File

@ -341,7 +341,7 @@ static int spl_fit_image_get_os(const void *fit, int noffset, uint8_t *os)
#endif #endif
} }
__weak int spl_fit_standalone_release(void) __weak int spl_fit_standalone_release(uintptr_t entry_point)
{ {
return 0; return 0;
} }
@ -454,9 +454,12 @@ static int spl_internal_load_simple_fit(struct spl_image_info *spl_image,
if (node > 0) { if (node > 0) {
/* Load the image and set up the spl_image structure */ /* Load the image and set up the spl_image structure */
ret = spl_load_fit_image(info, sector, fit, base_offset, node, ret = spl_load_fit_image(info, sector, fit, base_offset, node,
spl_image); &image_info);
if (!ret) { if (!ret) {
ret = spl_fit_standalone_release(); if (image_info.entry_point == FDT_ERROR)
image_info.entry_point = image_info.load_addr;
ret = spl_fit_standalone_release(image_info.entry_point);
if (ret) if (ret)
printf("Start standalone fail, ret = %d\n", printf("Start standalone fail, ret = %d\n",
ret); ret);