summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2021-08-06 07:44:26 +0300
committerStefano Babic <sbabic@denx.de>2021-10-07 17:53:50 +0300
commit884ba50a078f57df5bf18a1bbc8aa337f5ce404d (patch)
tree5550d37706ab4013c6c3814aa433ca6389760eb4 /common
parent7d4541cdfbf9697c39e720690f13b9c02d3c7555 (diff)
downloadu-boot-884ba50a078f57df5bf18a1bbc8aa337f5ce404d.tar.xz
spl_fit. add hook to make fixes after fit header is loaded
add hook function spl_load_simple_fit_fix_load() which is called after fit image header is loaded. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_fit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index f41abca0cc..849e01ad8e 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -548,6 +548,15 @@ __weak bool spl_load_simple_fit_skip_processing(void)
return false;
}
+/*
+ * Weak default function to allow fixes after fit header
+ * is loaded.
+ */
+__weak void *spl_load_simple_fit_fix_load(const void *fit)
+{
+ return (void *)fit;
+}
+
static void warn_deprecated(const char *msg)
{
printf("DEPRECATED: %s\n", msg);
@@ -685,6 +694,8 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
if (spl_load_simple_fit_skip_processing())
return 0;
+ ctx.fit = spl_load_simple_fit_fix_load(ctx.fit);
+
ret = spl_simple_fit_parse(&ctx);
if (ret < 0)
return ret;