diff options
author | Simon Glass <sjg@chromium.org> | 2016-09-24 18:20:15 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-06 15:08:53 -0400 |
commit | 710e9ca5795c9762b09028f1e151981c9052d012 (patch) | |
tree | 19e51d8764f39280ed0c9fa154ae12894fcfbf69 /common/spl/spl_usb.c | |
parent | b4a6c2aae6165782dd9fa4944b38c2c2a7419af1 (diff) | |
download | u-boot-710e9ca5795c9762b09028f1e151981c9052d012.tar.gz |
spl: Update fat functions to take an spl_image parameter
Update the fat loader to avoid using the spl_image global variable.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl/spl_usb.c')
-rw-r--r-- | common/spl/spl_usb.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c index aaa4f8103fa..e37966ed6ce 100644 --- a/common/spl/spl_usb.c +++ b/common/spl/spl_usb.c @@ -48,12 +48,15 @@ static int spl_usb_load_image(struct spl_image_info *spl_image, debug("boot mode - FAT\n"); #ifdef CONFIG_SPL_OS_BOOT - if (spl_start_uboot() || spl_load_image_fat_os(stor_dev, - CONFIG_SYS_USB_FAT_BOOT_PARTITION)) + if (spl_start_uboot() || + spl_load_image_fat_os(spl_image, stor_dev, + CONFIG_SYS_USB_FAT_BOOT_PARTITION)) #endif - err = spl_load_image_fat(stor_dev, - CONFIG_SYS_USB_FAT_BOOT_PARTITION, - CONFIG_SPL_FS_LOAD_PAYLOAD_NAME); + { + err = spl_load_image_fat(spl_image, stor_dev, + CONFIG_SYS_USB_FAT_BOOT_PARTITION, + CONFIG_SPL_FS_LOAD_PAYLOAD_NAME); + } if (err) { puts("Error loading from USB device\n"); |