summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2019-09-23 10:18:47 +0800
committerStefano Babic <sbabic@denx.de>2019-10-08 16:36:36 +0200
commitd9bd2f4a4efa15b129749978ca48675633a13668 (patch)
treefa2a4b81a8ead7e1d6e7c785742eb21cfc94d8fa /common/spl
parent00e180cc513ee8ea4f2a3c17758772e710deb4df (diff)
spl: spi: support loading i.MX container format file
i.MX8 only support AHAB secure boot with Container format image, we could not use FIT to support secure boot, so introduce container support to let SPL could load container images. Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: York Sun <york.sun@nxp.com> Cc: Marek Vasut <marex@denx.de> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl_spi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 84f20ea4ed..288dbb5fa9 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -141,6 +141,17 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
err = spl_load_simple_fit(spl_image, &load,
payload_offs,
header);
+ } else if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER)) {
+ struct spl_load_info load;
+
+ load.dev = flash;
+ load.priv = NULL;
+ load.filename = NULL;
+ load.bl_len = 1;
+ load.read = spl_spi_fit_read;
+
+ err = spl_load_imx_container(spl_image, &load,
+ payload_offs);
} else {
err = spl_parse_image_header(spl_image, header);
if (err)