aboutsummaryrefslogtreecommitdiffstats
path: root/common/spl/spl.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-01-20 12:40:20 -0500
committerTom Rini <trini@konsulko.com>2022-01-20 12:40:20 -0500
commit2d7a463e82daeba4f6a7fb59bac0fe94d6f6d3a2 (patch)
tree96e28ce689933dd4ebd120309a9caa2e02897d48 /common/spl/spl.c
parent3918376e91dac7711cf04bd06f8de80e797edfea (diff)
parent8f880c3d89432e9988b23bb7099d6360c14a206f (diff)
downloadu-boot-2d7a463e82daeba4f6a7fb59bac0fe94d6f6d3a2.tar.gz
Merge https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/20Jan2022
- fdt_support: Add fdt_for_each_node_by_compatible() helper macro (Marek) - turris_omnia: Fixup SATA or PCIe nodes at runtime in DT blob (Pali) - pci_mvebu: Add support for Kirkwood PCIe controllers (Pali) - SPL: More verifications for kwbimage in SPL (Pali) - mvebu: Remove comphy_update_map() (Pali) - Minor misc stuff
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r--common/spl/spl.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 4bb9455efbd..6945ecb56ef 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -312,6 +312,7 @@ static int spl_load_fit_image(struct spl_image_info *spl_image,
#endif
__weak int spl_parse_board_header(struct spl_image_info *spl_image,
+ const struct spl_boot_device *bootdev,
const void *image_header, size_t size)
{
return -EINVAL;
@@ -326,6 +327,7 @@ __weak int spl_parse_legacy_header(struct spl_image_info *spl_image,
}
int spl_parse_image_header(struct spl_image_info *spl_image,
+ const struct spl_boot_device *bootdev,
const struct image_header *header)
{
#if CONFIG_IS_ENABLED(LOAD_FIT_FULL)
@@ -369,7 +371,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
}
#endif
- if (!spl_parse_board_header(spl_image, (const void *)header, sizeof(*header)))
+ if (!spl_parse_board_header(spl_image, bootdev, (const void *)header, sizeof(*header)))
return 0;
#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT
@@ -587,6 +589,12 @@ static struct spl_image_loader *spl_ll_find_loader(uint boot_device)
return NULL;
}
+__weak int spl_check_board_image(struct spl_image_info *spl_image,
+ const struct spl_boot_device *bootdev)
+{
+ return 0;
+}
+
static int spl_load_image(struct spl_image_info *spl_image,
struct spl_image_loader *loader)
{
@@ -608,6 +616,9 @@ static int spl_load_image(struct spl_image_info *spl_image,
}
}
#endif
+ if (!ret)
+ ret = spl_check_board_image(spl_image, &bootdev);
+
return ret;
}