Message ID | 1563414056-20331-5-git-send-email-sherry.sun@nxp.com |
---|---|
State | Superseded |
Delegated to: | Stefano Babic |
Headers | show |
Series | Make some changes to SDP | expand |
On Thu, 18 Jul 2019 09:40:56 +0800 sherry sun <sherry.sun@nxp.com> wrote: > From: Sherry Sun <sherry.sun@nxp.com> > > Need initialize UDC before run sdp download and release it at the end > of sdp. > > Signed-off-by: Sherry Sun <sherry.sun@nxp.com> > Signed-off-by: Frank Li <Frank.Li@nxp.com> > --- > common/spl/spl_sdp.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c > index 806bf1327e..7b0a213d4c 100644 > --- a/common/spl/spl_sdp.c > +++ b/common/spl/spl_sdp.c > @@ -16,6 +16,8 @@ static int spl_sdp_load_image(struct spl_image_info > *spl_image, int ret; > const int controller_index = 0; > > + usb_gadget_initialize(controller_index); > + > g_dnl_clear_detach(); > ret = g_dnl_register("usb_dnl_sdp"); > if (ret) { > @@ -37,6 +39,8 @@ 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); Reviewed-by: Lukasz Majewski <lukma@denx.de> Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c index 806bf1327e..7b0a213d4c 100644 --- a/common/spl/spl_sdp.c +++ b/common/spl/spl_sdp.c @@ -16,6 +16,8 @@ static int spl_sdp_load_image(struct spl_image_info *spl_image, int ret; const int controller_index = 0; + usb_gadget_initialize(controller_index); + g_dnl_clear_detach(); ret = g_dnl_register("usb_dnl_sdp"); if (ret) { @@ -37,6 +39,8 @@ 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);