diff options
Diffstat (limited to 'common/spl/spl_sdp.c')
-rw-r--r-- | common/spl/spl_sdp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c index 806bf1327e..e7f7b68411 100644 --- a/common/spl/spl_sdp.c +++ b/common/spl/spl_sdp.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <log.h> #include <spl.h> #include <usb.h> #include <g_dnl.h> @@ -14,7 +15,9 @@ static int spl_sdp_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { int ret; - const int controller_index = 0; + const int controller_index = CONFIG_SPL_SDP_USB_DEV; + + usb_gadget_initialize(controller_index); g_dnl_clear_detach(); ret = g_dnl_register("usb_dnl_sdp"); @@ -37,6 +40,7 @@ static int spl_sdp_load_image(struct spl_image_info *spl_image, ret = spl_sdp_handle(controller_index, spl_image); debug("SDP ended\n"); + usb_gadget_release(controller_index); return ret; } SPL_LOAD_IMAGE_METHOD("USB SDP", 0, BOOT_DEVICE_BOARD, spl_sdp_load_image); |