diff mbox series

[5/5] spl: sdp: Add DM gadget support for sdp

Message ID 20200429023514.9008-5-peng.fan@nxp.com
State Accepted
Commit d8e775539e6d69a2bf9d4de721f6ad1560de7823
Delegated to: Stefano Babic
Headers show
Series [1/5] spl: sdp: call board_usb_init at spl_sdp_load_image | expand

Commit Message

Peng Fan April 29, 2020, 2:35 a.m. UTC
From: Sherry Sun <sherry.sun@nxp.com>

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>
---
 common/spl/spl_sdp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefano Babic May 4, 2020, 7:34 a.m. UTC | #1
> From: Sherry Sun <sherry.sun@nxp.com>
> 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>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c
index d150951b86..644dfa8cc3 100644
--- a/common/spl/spl_sdp.c
+++ b/common/spl/spl_sdp.c
@@ -16,7 +16,7 @@  static int spl_sdp_load_image(struct spl_image_info *spl_image,
 	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");
@@ -39,7 +39,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");
 
-	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);