diff mbox series

[v2,1/7] sdp: call board_usb_init at spl_sdp_load_image

Message ID 20200818101649.16509-2-peng.fan@nxp.com
State Accepted
Commit 0ced2faba08a9faf0ac1cbeb2a320faa635651d9
Delegated to: Lukasz Majewski
Headers show
Series f_sdp: fix and update | expand

Commit Message

Peng Fan Aug. 18, 2020, 10:16 a.m. UTC
From: Frank Li <Frank.Li@nxp.com>

Need initialize UDC before run sdp download

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 common/spl/spl_sdp.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Lukasz Majewski Aug. 18, 2020, 11:22 a.m. UTC | #1
Hi Peng,

> From: Frank Li <Frank.Li@nxp.com>
> 
> Need initialize UDC before run sdp download
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  common/spl/spl_sdp.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c
> index e7f7b68411..ae9c09883a 100644
> --- a/common/spl/spl_sdp.c
> +++ b/common/spl/spl_sdp.c
> @@ -19,6 +19,8 @@ static int spl_sdp_load_image(struct spl_image_info
> *spl_image, 
>  	usb_gadget_initialize(controller_index);
>  
> +	board_usb_init(0, USB_INIT_DEVICE);
> +

Is your board supporting device tree? And the 0 shall be adjustable -
so others could re-use it.

>  	g_dnl_clear_detach();
>  	ret = g_dnl_register("usb_dnl_sdp");
>  	if (ret) {




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
Peng Fan Aug. 18, 2020, 12:31 p.m. UTC | #2
> Subject: Re: [PATCH v2 1/7] sdp: call board_usb_init at spl_sdp_load_image
> 
> Hi Peng,
> 
> > From: Frank Li <Frank.Li@nxp.com>
> >
> > Need initialize UDC before run sdp download
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  common/spl/spl_sdp.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c index
> > e7f7b68411..ae9c09883a 100644
> > --- a/common/spl/spl_sdp.c
> > +++ b/common/spl/spl_sdp.c
> > @@ -19,6 +19,8 @@ static int spl_sdp_load_image(struct spl_image_info
> > *spl_image,
> >  	usb_gadget_initialize(controller_index);
> >
> > +	board_usb_init(0, USB_INIT_DEVICE);
> > +
> 
> Is your board supporting device tree? And the 0 shall be adjustable - so others
> could re-use it.

Ok. Will add that.

Thanks,
Peng.

> 
> >  	g_dnl_clear_detach();
> >  	ret = g_dnl_register("usb_dnl_sdp");
> >  	if (ret) {
> 
> 
> 
> 
> 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 mbox series

Patch

diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c
index e7f7b68411..ae9c09883a 100644
--- a/common/spl/spl_sdp.c
+++ b/common/spl/spl_sdp.c
@@ -19,6 +19,8 @@  static int spl_sdp_load_image(struct spl_image_info *spl_image,
 
 	usb_gadget_initialize(controller_index);
 
+	board_usb_init(0, USB_INIT_DEVICE);
+
 	g_dnl_clear_detach();
 	ret = g_dnl_register("usb_dnl_sdp");
 	if (ret) {