diff options
Diffstat (limited to 'common/spl/spl_usb.c')
-rw-r--r-- | common/spl/spl_usb.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c index 04fa667..e37966e 100644 --- a/common/spl/spl_usb.c +++ b/common/spl/spl_usb.c @@ -22,7 +22,8 @@ DECLARE_GLOBAL_DATA_PTR; static int usb_stor_curr_dev = -1; /* current device */ #endif -int spl_usb_load_image(void) +static int spl_usb_load_image(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) { int err; struct blk_desc *stor_dev; @@ -47,12 +48,15 @@ int spl_usb_load_image(void) 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"); @@ -61,3 +65,4 @@ int spl_usb_load_image(void) return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_USB, spl_usb_load_image); |