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>
This commit is contained in:
Simon Glass
2016-09-24 18:20:15 -06:00
committed by Tom Rini
parent b4a6c2aae6
commit 710e9ca579
5 changed files with 33 additions and 22 deletions

View File

@@ -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");