mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-13 08:27:23 +00:00
spl: Convert spl_usb_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
dd6bf9025c
commit
56df46351a
3 changed files with 2 additions and 7 deletions
|
@ -400,9 +400,6 @@ static int spl_load_image(u32 boot_device)
|
||||||
bootdev.boot_device_name = "usb_ether";
|
bootdev.boot_device_name = "usb_ether";
|
||||||
return spl_net_load_image(&bootdev);
|
return spl_net_load_image(&bootdev);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SPL_USB_SUPPORT
|
|
||||||
case BOOT_DEVICE_USB:
|
|
||||||
return spl_usb_load_image(&bootdev);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SPL_SATA_SUPPORT
|
#ifdef CONFIG_SPL_SATA_SUPPORT
|
||||||
case BOOT_DEVICE_SATA:
|
case BOOT_DEVICE_SATA:
|
||||||
|
|
|
@ -22,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||||
static int usb_stor_curr_dev = -1; /* current device */
|
static int usb_stor_curr_dev = -1; /* current device */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int spl_usb_load_image(struct spl_boot_device *bootdev)
|
static int spl_usb_load_image(struct spl_boot_device *bootdev)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct blk_desc *stor_dev;
|
struct blk_desc *stor_dev;
|
||||||
|
@ -61,3 +61,4 @@ int spl_usb_load_image(struct spl_boot_device *bootdev)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_USB, spl_usb_load_image);
|
||||||
|
|
|
@ -187,9 +187,6 @@ int spl_spi_load_image(struct spl_boot_device *bootdev);
|
||||||
/* Ethernet SPL functions */
|
/* Ethernet SPL functions */
|
||||||
int spl_net_load_image(struct spl_boot_device *bootdev);
|
int spl_net_load_image(struct spl_boot_device *bootdev);
|
||||||
|
|
||||||
/* USB SPL functions */
|
|
||||||
int spl_usb_load_image(struct spl_boot_device *bootdev);
|
|
||||||
|
|
||||||
/* SATA SPL functions */
|
/* SATA SPL functions */
|
||||||
int spl_sata_load_image(struct spl_boot_device *bootdev);
|
int spl_sata_load_image(struct spl_boot_device *bootdev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue