From: Peng Fan Date: Mon, 23 Sep 2019 02:18:46 +0000 (+0800) Subject: spl: nand: support loading i.MX container format file X-Git-Tag: v2020.01-rc1~33^2~30 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=00e180cc513ee8ea4f2a3c17758772e710deb4df;p=oweals%2Fu-boot.git spl: nand: 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 Cc: Tien Fong Chee Cc: York Sun Cc: Marek Vasut Cc: Alex Kiernan Cc: Simon Glass Cc: Philipp Tomsich Cc: Kever Yang Cc: Heiko Schocher Signed-off-by: Peng Fan --- diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index d3185dc017..5f8a111a2f 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -68,6 +68,15 @@ static int spl_nand_load_element(struct spl_image_info *spl_image, load.bl_len = 1; load.read = spl_nand_fit_read; return spl_load_simple_fit(spl_image, &load, offset, header); + } else if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER)) { + struct spl_load_info load; + + load.dev = NULL; + load.priv = NULL; + load.filename = NULL; + load.bl_len = 1; + load.read = spl_nand_fit_read; + return spl_load_imx_container(spl_image, &load, offset); } else { err = spl_parse_image_header(spl_image, header); if (err)