From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A79EC07E99 for ; Mon, 5 Jul 2021 12:13:37 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34B366135C for ; Mon, 5 Jul 2021 12:13:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34B366135C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B935582B66; Mon, 5 Jul 2021 14:13:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 3BFD982B66; Mon, 5 Jul 2021 14:13:32 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id AB6E480F47 for ; Mon, 5 Jul 2021 14:13:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B6F7F1042; Mon, 5 Jul 2021 05:13:27 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14D383F73B; Mon, 5 Jul 2021 05:13:25 -0700 (PDT) Date: Mon, 5 Jul 2021 13:12:51 +0100 From: Andre Przywara To: Marek Vasut Cc: Bin Meng , Samuel Holland , Jagan Teki , Andre Heider , Icenowy Zheng , Simon Glass , Kever Yang , Chen-Yu Tsai , Maxime Ripard , U-Boot Mailing List Subject: Re: [PATCH v2 2/4] usb: xhci-pci: Move reset logic out of XHCI core Message-ID: <20210705131251.19f77997@slackpad.fritz.box> In-Reply-To: <42a3939a-3a70-4a71-efe4-116b3d916550@denx.de> References: <20210417142059.45337-1-samuel@sholland.org> <20210417142059.45337-3-samuel@sholland.org> <20210705100646.28e81de3@slackpad.fritz.box> <42a3939a-3a70-4a71-efe4-116b3d916550@denx.de> Organization: Arm Ltd. X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Mon, 5 Jul 2021 12:45:59 +0200 Marek Vasut 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 wrote: > >> > >> On Mon, 5 Jul 2021 16:38:29 +0800 > >> Bin Meng wrote: > >> > >> Hi, > >> > >>> On Mon, Jul 5, 2021 at 4:19 PM Marek Vasut wrote: > >>>> > >>>> On 7/5/21 10:04 AM, Bin Meng wrote: > >>>>> On Sat, Apr 17, 2021 at 10:21 PM Samuel Holland 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 > >>>>>> --- > >>>>>> 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 > >>>> > >>>> 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