summaryrefslogtreecommitdiff
path: root/common/spl/spl.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-04-29 00:44:54 +0200
committerStefano Babic <sbabic@denx.de>2016-05-17 17:52:20 +0200
commit7e0f22674ae871460706f9cc8653487bb51e0804 (patch)
tree604b55f32c78eee29614bfd6a99d7525f168384d /common/spl/spl.c
parent249092fa81f3dd3fee94fd05973833e30405f3c4 (diff)
downloadu-boot-imx-7e0f22674ae871460706f9cc8653487bb51e0804.zip
u-boot-imx-7e0f22674ae871460706f9cc8653487bb51e0804.tar.gz
u-boot-imx-7e0f22674ae871460706f9cc8653487bb51e0804.tar.bz2
SPL: Let spl_parse_image_header() return value
Allow the spl_parse_image_header() to return value. This is convenient for controlling the SPL boot flow if the loaded image is corrupted. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Peng Fan <van.freenix@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r--common/spl/spl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 82e7f58..7259619 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -73,7 +73,7 @@ void spl_set_header_raw_uboot(void)
spl_image.name = "U-Boot";
}
-void spl_parse_image_header(const struct image_header *header)
+int spl_parse_image_header(const struct image_header *header)
{
u32 header_size = sizeof(struct image_header);
@@ -118,6 +118,7 @@ void spl_parse_image_header(const struct image_header *header)
spl_set_header_raw_uboot();
#endif
}
+ return 0;
}
__weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)