summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAbel Vesa <abel.vesa@nxp.com>2018-11-07 18:13:08 +0200
committerAbel Vesa <abel.vesa@nxp.com>2018-11-09 11:45:15 +0200
commit2bd8277fd7eceed3aa4b07b6fe238b7beef62530 (patch)
tree09682a6944b732fca3a8d02c9023a5810ae9985e /arch
parent32adc4aed8864fe274de13f14f4e29759062ee1d (diff)
MLK-20233 spl_spi: Add QSPI boot device support to the container parser
Before parsing the image header, try to check if there is a container and validate it first. If no (valid) container then as a fall-through parse the image as before. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/imx8/parser.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8/parser.c b/arch/arm/mach-imx/imx8/parser.c
index 5186b1c83c8..7ddb1702bf2 100644
--- a/arch/arm/mach-imx/imx8/parser.c
+++ b/arch/arm/mach-imx/imx8/parser.c
@@ -230,3 +230,19 @@ int mmc_load_image_parse_container(struct spl_image_info *spl_image,
return ret;
}
+
+int spi_load_image_parse_container(struct spl_image_info *spl_image,
+ struct spi_flash *flash,
+ unsigned long offset)
+{
+ int ret = 0;
+
+ current_dev_type = QSPI_DEV;
+ device = flash;
+
+ start_offset = offset;
+
+ ret = read_auth_container(spl_image);
+
+ return ret;
+}