From: Roger Quadros <rogerq@kernel.org>
To: Ravi Gunasekaran <r-gunasekaran@ti.com>, marex@denx.de
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH] usb: cdns3: gadget.c: Set fast access bit
Date: Fri, 5 May 2023 15:32:34 +0300 [thread overview]
Message-ID: <78903233-bb52-8ecd-ef65-df104fff069a@kernel.org> (raw)
In-Reply-To: <20230505121353.23486-1-r-gunasekaran@ti.com>
Hi Ravi,
On 05/05/2023 15:13, Ravi Gunasekaran wrote:
> From: Aswath Govindraju <a-govindraju@ti.com>
>
> 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 <a-govindraju@ti.com>
> ---
> 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
next prev parent reply other threads:[~2023-05-05 12:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 12:13 [PATCH] usb: cdns3: gadget.c: Set fast access bit Ravi Gunasekaran
2023-05-05 12:32 ` Roger Quadros [this message]
2023-05-09 5:58 ` [EXTERNAL] " Ravi Gunasekaran
2023-05-10 9:10 ` Roger Quadros
2023-05-11 5:30 ` Pawel Laszczak
2023-05-11 9:33 ` Ravi Gunasekaran
2023-05-12 4:42 ` Pawel Laszczak
2023-05-11 12:10 ` Roger Quadros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78903233-bb52-8ecd-ef65-df104fff069a@kernel.org \
--to=rogerq@kernel.org \
--cc=marex@denx.de \
--cc=r-gunasekaran@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox