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 AF211C07E98 for ; Mon, 5 Jul 2021 09:07:35 +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 015A560698 for ; Mon, 5 Jul 2021 09:07:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 015A560698 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 D8E37814A4; Mon, 5 Jul 2021 11:07:32 +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 1B2DE82A29; Mon, 5 Jul 2021 11:07:30 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id A7EA8814A4 for ; Mon, 5 Jul 2021 11:07:25 +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 EA9E71063; Mon, 5 Jul 2021 02:07:24 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6EE793F5A1; Mon, 5 Jul 2021 02:07:23 -0700 (PDT) Date: Mon, 5 Jul 2021 10:06:46 +0100 From: Andre Przywara To: Bin Meng Cc: Marek Vasut , 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: <20210705100646.28e81de3@slackpad.fritz.box> In-Reply-To: References: <20210417142059.45337-1-samuel@sholland.org> <20210417142059.45337-3-samuel@sholland.org> 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 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. 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). Thanks! Andre