From: Peng Fan Date: Mon, 23 Sep 2019 02:18:47 +0000 (+0800) Subject: spl: spi: support loading i.MX container format file X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=d9bd2f4a4efa15b129749978ca48675633a13668;p=u-boot.git 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 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_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)