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 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 7B11FC77B7F for ; Fri, 5 May 2023 12:32:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 77CD68477A; Fri, 5 May 2023 14:32:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="SsSXK08G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 86015846AC; Fri, 5 May 2023 14:32:42 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 48083805F0 for ; Fri, 5 May 2023 14:32:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rogerq@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9C9F863DA5; Fri, 5 May 2023 12:32:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41445C433D2; Fri, 5 May 2023 12:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683289958; bh=95MdBioSeLIw7vHAzKw+oCcMnVPKLV38IGPLF5/dsTo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SsSXK08GAgYUJl8OCEW/5/6gyrpCDAtunDAm9PdD+PoVRVAWYZ8vjkQjxB5jHavXc SzYjeJ4/yX4XYg4mM5Ufy1NZpRSMpTWZW3GIA5kxEZlgHmRDUFSywZa8l1aOYAkJd7 1gKiQYDQYCmXpeodEitQ9v7AObQG6Tbug5+6O+uUi0JY/3M2/2hlACwiOkHgCBADTz 0Bd7gWIBFDNTCWVigjAXeFYlCU6zYtLAh9qunhl4ok2AlaBIn3eAZlGjwvPEEV8YPS T/qXzKrtFw7Ai449a6oDrDwJee0T3Mgr67kA82+bJxtJFesRPN49QD9WHnXGzsoU0w 7E0c4CiGW0JFA== Message-ID: <78903233-bb52-8ecd-ef65-df104fff069a@kernel.org> Date: Fri, 5 May 2023 15:32:34 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] usb: cdns3: gadget.c: Set fast access bit To: Ravi Gunasekaran , marex@denx.de Cc: u-boot@lists.denx.de References: <20230505121353.23486-1-r-gunasekaran@ti.com> Content-Language: en-US From: Roger Quadros In-Reply-To: <20230505121353.23486-1-r-gunasekaran@ti.com> Content-Type: text/plain; charset=UTF-8 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.8 at phobos.denx.de X-Virus-Status: Clean Hi Ravi, On 05/05/2023 15:13, Ravi Gunasekaran wrote: > From: Aswath Govindraju > > When the device port is in a low power state [U3/L2/Not Connected], > accesses to usb device registers may take a long time. This could lead to > potential core hang when the controller registers are accessed after the > port is disabled by setting DEVDS field. Setting the fast register access > bit ensures that the PHY clock is keeping up in active state. > > Therefore, set fast access bit to ensure the accesses to device registers > are quick even in low power states. > > Signed-off-by: Aswath Govindraju > --- > drivers/usb/cdns3/gadget.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c > index fcaeab9cc1..fddc8c931a 100644 > --- a/drivers/usb/cdns3/gadget.c > +++ b/drivers/usb/cdns3/gadget.c > @@ -2321,6 +2321,9 @@ static void cdns3_gadget_config(struct cdns3_device *priv_dev) > writel(USB_IEN_INIT, ®s->usb_ien); > writel(USB_CONF_CLK2OFFDS | USB_CONF_L1DS, ®s->usb_conf); > > + /* Set the Fast access bit */ > + writel(PUSB_PWR_FST_REG_ACCESS, &priv_dev->regs->usb_pwr); > + Should this be done in cdns3_gadget_udc_start() so it is symmetric? > cdns3_configure_dmult(priv_dev, NULL); > > cdns3_gadget_pullup(&priv_dev->gadget, 1); > @@ -2378,6 +2381,7 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget) > > /* disable interrupt for device */ > writel(0, &priv_dev->regs->usb_ien); > + writel(0, &priv_dev->regs->usb_pwr); > writel(USB_CONF_DEVDS, &priv_dev->regs->usb_conf); > > return ret; > > base-commit: a25dcda452bf6a6de72764a8d990d72e5def643d cheers, -roger