diff options
author | Simon Glass <sjg@chromium.org> | 2016-09-24 18:19:52 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-06 14:48:15 -0400 |
commit | d95ceb97c0ca158605372634a860651ca925915a (patch) | |
tree | 0fc61807e410cd256ec15bd02787e7cb3a31d8cb /common/spl/spl.c | |
parent | e50d76cc3c2894267a4b36a675abb957d6e3df8c (diff) | |
download | u-boot-d95ceb97c0ca158605372634a860651ca925915a.tar.gz |
spl: Add a parameter to spl_set_header_raw_uboot()
Rather than act on the global variable, pass the required struct in as a
parameter.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r-- | common/spl/spl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 57b73af4a7..b664cc7b21 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -82,13 +82,13 @@ __weak void spl_board_prepare_for_boot(void) /* Nothing to do! */ } -void spl_set_header_raw_uboot(void) +void spl_set_header_raw_uboot(struct spl_image_info *spl_image) { - spl_image.size = CONFIG_SYS_MONITOR_LEN; - spl_image.entry_point = CONFIG_SYS_UBOOT_START; - spl_image.load_addr = CONFIG_SYS_TEXT_BASE; - spl_image.os = IH_OS_U_BOOT; - spl_image.name = "U-Boot"; + spl_image->size = CONFIG_SYS_MONITOR_LEN; + spl_image->entry_point = CONFIG_SYS_UBOOT_START; + spl_image->load_addr = CONFIG_SYS_TEXT_BASE; + spl_image->os = IH_OS_U_BOOT; + spl_image->name = "U-Boot"; } int spl_parse_image_header(const struct image_header *header) @@ -153,7 +153,7 @@ int spl_parse_image_header(const struct image_header *header) /* Signature not found - assume u-boot.bin */ debug("mkimage signature not found - ih_magic = %x\n", header->ih_magic); - spl_set_header_raw_uboot(); + spl_set_header_raw_uboot(&spl_image); #endif } return 0; |