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, Angus Ainslie <angus@akkea.ca>
Subject: [PATCH] spl: spl_sdp: don't call board_usb_init twice
Date: Mon, 17 Jan 2022 06:11:46 -0800 [thread overview]
Message-ID: <20220117141145.206012-1-angus@akkea.ca> (raw)
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);
--
2.25.1
next reply other threads:[~2022-01-17 14:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 14:11 Angus Ainslie [this message]
2022-04-20 18:27 ` [PATCH] spl: spl_sdp: don't call board_usb_init twice Angus Ainslie
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=20220117141145.206012-1-angus@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