diff options
author | Jean-Jacques Hiblot | 2018-12-04 11:30:48 +0100 |
---|---|---|
committer | Marek Vasut | 2018-12-14 17:59:09 +0100 |
commit | 0f46fb58a2355edf631c19797ad5c1f5f9403236 (patch) | |
tree | ac14a52b2d78f78756457b899e32d5116b386232 /common/spl | |
parent | 9a1dde58f5ed4a929971b37b7436040947ec732a (diff) |
spl: net: dm: usb: bind the gadget before attempting to load the image
If DM_USB_GADGET is used, the usb ethernet gadget driver must be bound to a
controller before the image can be downloaded over the network.
In u-boot this can be done with the bind command. In SPL it must be done
programmatically.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl')
-rw-r--r-- | common/spl/spl_net.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c index b6967ff69ee..c91ad2b6ddd 100644 --- a/common/spl/spl_net.c +++ b/common/spl/spl_net.c @@ -85,7 +85,9 @@ int spl_net_load_image_usb(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { bootdev->boot_device_name = "usb_ether"; - +#if CONFIG_IS_ENABLED(DM_USB_GADGET) + usb_ether_init(); +#endif return spl_net_load_image(spl_image, bootdev); } SPL_LOAD_IMAGE_METHOD("USB eth", 0, BOOT_DEVICE_USBETH, spl_net_load_image_usb); |