From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: ci_udc: implement dfu_usb_get_reset
Date: Mon, 01 Sep 2014 09:28:40 +0200 [thread overview]
Message-ID: <20140901092840.03bf4f4c@amdc2363> (raw)
In-Reply-To: <1408996935-6428-1-git-send-email-swarren@wwwdotorg.org>
Hi Stephen,
> From: Stephen Warren <swarren@nvidia.com>
>
> This allows the USB code to determine whether a USB bus reset was
> issued, which in turn allows the code to differentiate between a
> detach (return to shell prompt) and a board reset/reboot request.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> Note that this patch relies on the following unapplied patch:
> [PATCH 1/2] dfu: Provide means to find difference between dfu-util -e
> and -R ---
> drivers/usb/gadget/ci_udc.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
> index 4cd19c3afd22..2572b346ebfa 100644
> --- a/drivers/usb/gadget/ci_udc.c
> +++ b/drivers/usb/gadget/ci_udc.c
> @@ -919,3 +919,10 @@ int usb_gadget_unregister_driver(struct
> usb_gadget_driver *driver)
> return 0;
> }
> +
> +bool dfu_usb_get_reset(void)
> +{
> + struct ci_udc *udc = (struct ci_udc *)controller.ctrl->hcor;
> +
> + return !!(readl(&udc->usbsts) & STS_URI);
> +}
Applied to u-boot-dfu.
Thanks!
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
prev parent reply other threads:[~2014-09-01 7:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 20:02 [U-Boot] [PATCH] usb: ci_udc: implement dfu_usb_get_reset Stephen Warren
2014-09-01 7:28 ` Lukasz Majewski [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=20140901092840.03bf4f4c@amdc2363 \
--to=l.majewski@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.