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=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 6E2B7C07E99 for ; Mon, 5 Jul 2021 10:46:06 +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 80A11613FC for ; Mon, 5 Jul 2021 10:46:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80A11613FC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 8BA5382B77; Mon, 5 Jul 2021 12:46:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1625481964; bh=PibQoB3+sJDM1FUesWnlfo3fH9Tax35o6dPKByc4i6Y=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=E9vXWdfCufaDfgL4PWDzmFAnmVn+yaKP0q2Pz0n64Y+6rN1abgV3DD7BA5d8aCOms J27r8Lv2xlpawyHxsuyJ13Bwqjr1/UkSbbTjpy1eXv6dKHdj5VEzgse77i7h7F2Dae rN/C6TObEFUT84yapSxweqNda4piQFhBKu83edvHOAm9cbzUPpa0fEJJ2vZ0gJzDfZ sXz0b/UBx4AkFBwM/hVbRdchvig52yo6AIniuvtet523eheAzo1+QQdMps4qLyjd3R VO+9G0V7GDH/4fO2JHZxbF8P0CqG09szJBqnCFvG6VePNHjQtmsngbmjTvKf53nwuq rK+04Vj54CNmw== Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 6313782A29; Mon, 5 Jul 2021 12:46:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1625481961; bh=PibQoB3+sJDM1FUesWnlfo3fH9Tax35o6dPKByc4i6Y=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=XAmxa6pcBxvNga9aaYrlmDLidEapAZEvaoHuaGeTpX5rr6DxQocaqDgdKxFT9n2ma 5Zj0itGpql9mq9R87WrewYwDw2JTIDCX7+ohbIheaymF2THGrYdOd6w14GVERMLLgP ADLp0He+MPldTht4cx++OosiJNBrR4QQvnJBZLEl4zQCSB5Zp9lctatJyrYvX+P2Ne gFAlwkwJJHudRIYsIQI+MfDSkGBdEZcrwLXh4UiEoBVE+XRd27HyAHDVWzORilVbxn K7QPZHdTeanHymPm91kAGy7+NY98CfHTLDjo7H+PrpteRRwB2K/OWlaCq+3R0rDdxt xlXtwaz0vVNHA== Subject: Re: [PATCH v2 2/4] usb: xhci-pci: Move reset logic out of XHCI core To: Bin Meng , Andre Przywara Cc: Samuel Holland , Jagan Teki , Andre Heider , Icenowy Zheng , Simon Glass , Kever Yang , Chen-Yu Tsai , Maxime Ripard , U-Boot Mailing List References: <20210417142059.45337-1-samuel@sholland.org> <20210417142059.45337-3-samuel@sholland.org> <20210705100646.28e81de3@slackpad.fritz.box> From: Marek Vasut Message-ID: <42a3939a-3a70-4a71-efe4-116b3d916550@denx.de> Date: Mon, 5 Jul 2021 12:45:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US 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 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.