summaryrefslogtreecommitdiff
path: root/include/spl.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-09-24 18:19:53 -0600
committerTom Rini <trini@konsulko.com>2016-10-06 14:48:17 -0400
commit71316c1d8c1799b444d14cfb00eaacb6cf1ce44a (patch)
treed7c0b1c644dfdeed26c7cfe5804a7dbdd8584026 /include/spl.h
parentd95ceb97c0ca158605372634a860651ca925915a (diff)
downloadu-boot-imx-71316c1d8c1799b444d14cfb00eaacb6cf1ce44a.zip
u-boot-imx-71316c1d8c1799b444d14cfb00eaacb6cf1ce44a.tar.gz
u-boot-imx-71316c1d8c1799b444d14cfb00eaacb6cf1ce44a.tar.bz2
spl: Add a parameter to spl_parse_image_header()
Instead of using the global spl_image variable, pass the required struct in as an argument. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/spl.h')
-rw-r--r--include/spl.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/include/spl.h b/include/spl.h
index c0c5f78..1770fd8 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -75,11 +75,27 @@ u32 spl_boot_mode(const u32 boot_device);
* config options: CONFIG_SYS_MONITOR_LEN, CONFIG_SYS_UBOOT_START,
* CONFIG_SYS_TEXT_BASE.
*
- * @spl_image: Image to set up
+ * @spl_image: Image description to set up
*/
void spl_set_header_raw_uboot(struct spl_image_info *spl_image);
-int spl_parse_image_header(const struct image_header *header);
+/**
+ * spl_parse_image_header() - parse the image header and set up info
+ *
+ * This parses the legacy image header information at @header and sets up
+ * @spl_image according to what is found. If no image header is found, then
+ * a raw image or bootz is assumed. If CONFIG_SPL_PANIC_ON_RAW_IMAGE is
+ * enabled, then this causes a panic. If CONFIG_SPL_ABORT_ON_RAW_IMAGE is
+ * enabled then U-Boot gives up. Otherwise U-Boot sets up the image using
+ * spl_set_header_raw_uboot(), or possibly the bootz header.
+ *
+ * @spl_image: Image description to set up
+ * @header image header to parse
+ * @return 0 if a header was correctly parsed, -ve on error
+ */
+int spl_parse_image_header(struct spl_image_info *spl_image,
+ const struct image_header *header);
+
void spl_board_prepare_for_linux(void);
void spl_board_prepare_for_boot(void);
int spl_board_ubi_load_image(u32 boot_device);