When enable CONFG_SPL_DM_USB_GADGET, sdp should use
usb_gadget_initialize() and usb_gadget_release() to
support DM gadget driver.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
int ret;
const int controller_index = CONFIG_SPL_SDP_USB_DEV;
- board_usb_init(controller_index, USB_INIT_DEVICE);
+ usb_gadget_initialize(controller_index);
g_dnl_clear_detach();
ret = g_dnl_register("usb_dnl_sdp");
ret = spl_sdp_handle(controller_index, spl_image);
debug("SDP ended\n");
- board_usb_cleanup(controller_index, USB_INIT_DEVICE);
+ usb_gadget_release(controller_index);
return ret;
}
SPL_LOAD_IMAGE_METHOD("USB SDP", 0, BOOT_DEVICE_BOARD, spl_sdp_load_image);