From: Angus Ainslie <angus@akkea.ca>
To: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>, u-boot@lists.denx.de
Cc: kernel@puri.sm
Subject: Re: [PATCH] spl: spl_sdp: don't call board_usb_init twice
Date: Wed, 20 Apr 2022 11:27:16 -0700 [thread overview]
Message-ID: <2e3fc5bef08e1c71b4bbd9b4bdf72157@akkea.ca> (raw)
In-Reply-To: <20220117141145.206012-1-angus@akkea.ca>
Hi
On 2022-01-17 06:11, Angus Ainslie wrote:
> When CONFIG_DM_USB is not defined then usb_gadget_initialize is just a
> call
> to board_usb_init. Calling board_usb_init twice causes the USB to fail
> so
> make sure the second invocation is not compiled in when CONFIG_DM_USB
> is
> not defined.
>
> Signed-off-by: Angus Ainslie <angus@akkea.ca>
> ---
> common/spl/spl_sdp.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c
> index ae9c09883a..2a2bc8475d 100644
> --- a/common/spl/spl_sdp.c
> +++ b/common/spl/spl_sdp.c
> @@ -17,7 +17,8 @@ static int spl_sdp_load_image(struct spl_image_info
> *spl_image,
> int ret;
> const int controller_index = CONFIG_SPL_SDP_USB_DEV;
>
> - usb_gadget_initialize(controller_index);
> + if (IS_ENABLED(CONFIG_DM_USB))
> + usb_gadget_initialize(controller_index);
>
> board_usb_init(0, USB_INIT_DEVICE);
Any comments on this patch ?
Thanks
Angus
prev parent reply other threads:[~2022-04-20 18:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 14:11 [PATCH] spl: spl_sdp: don't call board_usb_init twice Angus Ainslie
2022-04-20 18:27 ` Angus Ainslie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e3fc5bef08e1c71b4bbd9b4bdf72157@akkea.ca \
--to=angus@akkea.ca \
--cc=kernel@puri.sm \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox