From: Felipe Balbi <balbi@kernel.org>
To: Grigor Tovmasyan <Grigor.Tovmasyan@synopsys.com>,
John Youn <John.Youn@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org
Cc: Vardan Mikayelyan <mvardan@synopsys.com>,
Stefan Wahren <stefan.wahren@i2se.com>
Subject: [v2,02/49] usb: dwc2: Force mode optimizations
Date: Thu, 15 Feb 2018 15:01:43 +0200 [thread overview]
Message-ID: <8737229zk8.fsf@linux.intel.com> (raw)
Grigor Tovmasyan <Grigor.Tovmasyan@synopsys.com> writes:
> From: Vardan Mikayelyan <mvardan@synopsys.com>
>
> If the dr_mode is USB_DR_MODE_OTG, forcing the mode is needed during
> driver probe to get the host and device specific HW parameters. Then we
> clear the force mode bits so that the core operates in OTG mode.
>
> The force mode bits should not be touched at any other time during the
> driver lifetime and they should be preserved whenever the GUSBCFG
> register is written to. The force mode bit values will persist across
> soft resets of the core.
>
> If the dr_mode is either USB_DR_MODE_HOST or USB_DR_MODE_PERIPHERAL, the
> force mode is set just once at probe to configure the core as either a
> host or peripheral.
>
> Given the above, we no longer need any other reset delays, force delays,
> or any forced modes anywhere else in the driver. So replace all calls to
> dwc2_core_reset_and_force_dr_mode() with dwc2_core_reset() and remove
> all other unnecessary delays.
>
> Also remove the dwc2_force_mode_if_needed() function since the "if
> needed" part is already taken care of by the polling in
> dwc2_force_mode().
>
> Finally, remove all other calls to dwc2_clear_force_mode().
>
> Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
> Signed-off-by: John Youn <johnyoun@synopsys.com>
> Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
> Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Only patch #1 applied to testing/next.
checking file drivers/usb/dwc2/core.c
checking file drivers/usb/dwc2/core.h
Hunk #1 succeeded at 1106 (offset 6 lines).
checking file drivers/usb/dwc2/hcd.c
Hunk #3 succeeded at 2261 (offset 5 lines).
checking file drivers/usb/dwc2/params.c
Hunk #1 succeeded at 579 (offset -1 lines).
Hunk #2 FAILED at 603.
1 out of 2 hunks FAILED
checking file drivers/usb/dwc2/platform.c
Hunk #1 succeeded at 425 (offset 10 lines).
please rebase
next reply other threads:[~2018-02-15 13:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 13:01 Felipe Balbi [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-12-25 11:18 [v2,02/49] usb: dwc2: Force mode optimizations Grigor Tovmasyan
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=8737229zk8.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=Grigor.Tovmasyan@synopsys.com \
--cc=John.Youn@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=mvardan@synopsys.com \
--cc=stefan.wahren@i2se.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;
as well as URLs for NNTP newsgroup(s).