public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sherry Sun <sherry.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 4/4] SDP: Call usb_gadget_initialize and usb_gadget_release to support UDC
Date: Thu, 22 Aug 2019 01:46:24 +0000	[thread overview]
Message-ID: <20190822134455.32366-5-sherry.sun@nxp.com> (raw)
In-Reply-To: <20190822134455.32366-1-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>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
---
 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);
-- 
2.17.1

      parent reply	other threads:[~2019-08-22  1:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22  1:46 [U-Boot] [PATCH v3 0/4] Make some changes to SDP Sherry Sun
2019-08-22  1:46 ` [U-Boot] [PATCH v3 1/4] imx: spl: Change USB boot device type for imx8/8m Sherry Sun
2019-08-26  7:58   ` Lukasz Majewski
2019-08-22  1:46 ` [U-Boot] [PATCH v3 2/4] SDP: use CONFIG_SDP_LOADADDR as default load address Sherry Sun
2019-08-22  1:46 ` [U-Boot] [PATCH v3 3/4] SDP: fix wrong usb request size and add high speed endpoint descriptor Sherry Sun
2019-08-26  8:01   ` Lukasz Majewski
2019-08-26  8:52     ` Sherry Sun
2019-08-22  1:46 ` Sherry Sun [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=20190822134455.32366-5-sherry.sun@nxp.com \
    --to=sherry.sun@nxp.com \
    --cc=u-boot@lists.denx.de \
    /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