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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user