Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7750BC433F5 for ; Mon, 28 Mar 2022 16:53:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C99183CD1; Mon, 28 Mar 2022 18:53:51 +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=1648486431; bh=v6eEVl/drgYG4jO6CgggSismM42SxlwYW2mvW/FcmvE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Tn5GpYLL6liwmFfO5iXrEht2mJ4k475bVJ9CKJNiqf0PXA51oaffhN5BBLlRwLvco lwqHyb45QIyURr/B7CpIGujCe5AiYJggj96mhPduxr/PLachKMkME5/BY/QURi1i08 sPJlezJzoECbt1i+ONNvuRUvTic9TzsKY/GkuwWz0AkE4rOGpfX5A2ApKo5LooxM1j pvR3CiLveG+UfszIjsJVmL9EB6V5tBO6Jyp2lWyOEoJf61BBW7hihc6FbrcvALhJN8 XoK9Y7RjDPJfWe4aILG2t5uiK6dV8buS7KkBDPdEWnc1y9BoXdrHmerhIZUYwY6WEA ZsYrmrJCQtX+A== Received: from [127.0.0.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 9523483CAF; Mon, 28 Mar 2022 18:53:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1648486429; bh=v6eEVl/drgYG4jO6CgggSismM42SxlwYW2mvW/FcmvE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=lR71G1ny8YStRyb/1Os+72w+DM7u208T0FF4hBIyMaOvgR841HtaK4Yas80o6OEmB Zipd4qucLrYK9DO6T4oBcAAsSbxkgLqTaTErfbTEpZCbOTL+OVAyyBE7QFRjeXcXsQ ioTCSlruqL+BfiKEpi1aId5tc2IbQc67PkMrlUWJ1M+FUF2Rn/Koq24tg6pxyGBz7m PQfwjj4Dq1Yzb1IpvxTfq2eo/PuLwFAzPsMBySxrOkmMLoHXpgvxYQLD62hEIdEud5 eccdBkw4lrou3xHntxtx1toONgKFB6+Rpjg9+gN/gd40q2mPWm1vq/7hFDfUK67x7B t1ML/SmAHzz9g== Message-ID: Date: Mon, 28 Mar 2022 18:53:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] usb_hub: Set DM_FLAG_DEFAULT_PD_CTRL_OFF to usb_hub driver Content-Language: en-US To: Ye Li , u-boot@lists.denx.de Cc: uboot-imx@nxp.com, Simon Glass References: <1648458571-127415-1-git-send-email-ye.li@nxp.com> From: Marek Vasut In-Reply-To: <1648458571-127415-1-git-send-email-ye.li@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean On 3/28/22 11:09, Ye Li wrote: > Because usb_hub uses same device tree node with USB controller device, > when probe and remove usb_hub, it will call the power domain control of > USB controller device. > This is not expected, because power domain control implmentation may not > have count when the power domain is dedicated for USB controller. So once > removed usb_hub, the power domain is power off before removing USB controller. > > Signed-off-by: Ye Li > --- > common/usb_hub.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/usb_hub.c b/common/usb_hub.c > index ba11a18..990993a 100644 > --- a/common/usb_hub.c > +++ b/common/usb_hub.c > @@ -950,7 +950,7 @@ U_BOOT_DRIVER(usb_generic_hub) = { > .name = "usb_hub", > .id = UCLASS_USB_HUB, > .of_match = usb_hub_ids, > - .flags = DM_FLAG_ALLOC_PRIV_DMA, > + .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_DEFAULT_PD_CTRL_OFF, > }; +CC Simon. Which device does trigger this behavior ? Do you have a test case you can share ?