From: Andre Przywara <andre.przywara@arm.com>
To: Marek Vasut <marex@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Jagan Teki <jagan@amarulasolutions.com>,
Andre Heider <a.heider@gmail.com>,
Icenowy Zheng <icenowy@aosc.io>, Simon Glass <sjg@chromium.org>,
Kever Yang <kever.yang@rock-chips.com>,
Chen-Yu Tsai <wens@csie.org>, Maxime Ripard <mripard@kernel.org>,
U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v2 2/4] usb: xhci-pci: Move reset logic out of XHCI core
Date: Mon, 5 Jul 2021 13:12:51 +0100 [thread overview]
Message-ID: <20210705131251.19f77997@slackpad.fritz.box> (raw)
In-Reply-To: <42a3939a-3a70-4a71-efe4-116b3d916550@denx.de>
On Mon, 5 Jul 2021 12:45:59 +0200
Marek Vasut <marex@denx.de> wrote:
Hi,
> On 7/5/21 11:18 AM, Bin Meng wrote:
> > Hi Andre,
> >
> > On Mon, Jul 5, 2021 at 5:07 PM Andre Przywara <andre.przywara@arm.com> wrote:
> >>
> >> On Mon, 5 Jul 2021 16:38:29 +0800
> >> Bin Meng <bmeng.cn@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >>> On Mon, Jul 5, 2021 at 4:19 PM Marek Vasut <marex@denx.de> wrote:
> >>>>
> >>>> On 7/5/21 10:04 AM, Bin Meng wrote:
> >>>>> On Sat, Apr 17, 2021 at 10:21 PM Samuel Holland <samuel@sholland.org> wrote:
> >>>>>>
> >>>>>> Resetting an XHCI controller inside xhci_register undoes any register
> >>>>>> setup performed by the platform driver. And at least on the Allwinner
> >>>>>> H6, resetting the XHCI controller also resets the PHY, which prevents
> >>>>>> the controller from working. That means the controller must be taken out
> >>>>>> of reset before initializing the PHY, which must be done before calling
> >>>>>> xhci_register.
> >>>>>>
> >>>>>> The logic in the XHCI core was added to support the Raspberry Pi 4
> >>>>>> (although this was not mentioned in the commit log!), which uses the
> >>>>>> xhci-pci platform driver. Move the reset logic to the platform driver,
> >>>>>> where it belongs, and where it cannot interfere with other platform
> >>>>>> drivers.
> >>>>>>
> >>>>>> This also fixes a failure to call reset_free if xhci_register failed.
> >>>>>>
> >>>>>> Fixes: 0b80371b350e ("usb: xhci: Add reset controller support")
> >>>>>> Signed-off-by: Samuel Holland <samuel@sholland.org>
> >>>>>> ---
> >>>>>> drivers/usb/host/xhci-mem.c | 2 --
> >>>>>> drivers/usb/host/xhci-pci.c | 51 ++++++++++++++++++++++++++++++++++---
> >>>>>> drivers/usb/host/xhci.c | 35 -------------------------
> >>>>>> include/usb/xhci.h | 2 --
> >>>>>> 4 files changed, 47 insertions(+), 43 deletions(-)
> >>>>>>
> >>>>>
> >>>>> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> >>>>
> >>>> So shall we apply this whole thing for 2021.10 ?
> >>>
> >>> Yes. Andre wanted to get this in 2021.07 which is too late.
> >>
> >> Ah, sorry, I didn't mean into this release, but into the 2021.10 merge
> >> window. I was preparing the sunxi patches for the PR, so stumbled upon
> >> this.
> >
> > Ah, 2021.01 is not a problem.
> >
> >>
> >> So I'd be grateful if you could push this into the MW, I can then
> >> finish up the sunxi side of things (patch 4/4).
> >
> > Marek can pick up this soon.
>
> U-Boot CI seems to fail on this, please recheck that.
Ouch, thanks for the heads up!
It's xhci-pci.c failing, as used by the RPi4, for instance.
I will send a v3 ASAP.
Cheers,
Andre
next prev parent reply other threads:[~2021-07-05 12:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-17 14:20 [PATCH v2 0/4] Allwinner H6 USB3 support Samuel Holland
2021-04-17 14:20 ` [PATCH v2 1/4] phy: sun50i-usb3: Add a driver for the H6 USB3 PHY Samuel Holland
2021-04-17 14:20 ` [PATCH v2 2/4] usb: xhci-pci: Move reset logic out of XHCI core Samuel Holland
2021-04-21 10:36 ` Andre Przywara
2021-04-21 13:36 ` Samuel Holland
2021-04-21 14:58 ` Andre Przywara
2021-07-05 8:04 ` Bin Meng
2021-07-05 8:19 ` Marek Vasut
2021-07-05 8:38 ` Bin Meng
2021-07-05 9:06 ` Andre Przywara
2021-07-05 9:18 ` Bin Meng
2021-07-05 10:45 ` Marek Vasut
2021-07-05 12:12 ` Andre Przywara [this message]
2021-07-05 9:20 ` Marek Vasut
2021-04-17 14:20 ` [PATCH v2 3/4] usb: xhci-dwc3: Add support for clocks/resets Samuel Holland
2021-04-21 10:37 ` Andre Przywara
2021-04-17 14:20 ` [PATCH v2 4/4] configs: Enable USB3 on Allwinner H6 boards Samuel Holland
2021-04-21 10:37 ` Andre Przywara
2021-04-21 10:43 ` [PATCH v2 0/4] Allwinner H6 USB3 support Andre Przywara
2021-04-21 10:53 ` Marek Vasut
2021-07-04 23:09 ` Andre Przywara
2021-07-05 1:18 ` Bin Meng
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=20210705131251.19f77997@slackpad.fritz.box \
--to=andre.przywara@arm.com \
--cc=a.heider@gmail.com \
--cc=bmeng.cn@gmail.com \
--cc=icenowy@aosc.io \
--cc=jagan@amarulasolutions.com \
--cc=kever.yang@rock-chips.com \
--cc=marex@denx.de \
--cc=mripard@kernel.org \
--cc=samuel@sholland.org \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=wens@csie.org \
/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