[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.2004291500390.19187-100000@netrider.rowland.org>
Date: Wed, 29 Apr 2020 15:08:47 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Al Cooper <alcooperx@...il.com>
cc: linux-kernel@...r.kernel.org,
<bcm-kernel-feedback-list@...adcom.com>,
<devicetree@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
<linux-usb@...r.kernel.org>,
Mathias Nyman <mathias.nyman@...el.com>,
Rob Herring <robh+dt@...nel.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH v4 3/4] usb: ehci: Add new EHCI driver for Broadcom STB
SoC's
On Wed, 29 Apr 2020, Al Cooper wrote:
> Add a new EHCI driver for Broadcom STB SoC's. A new EHCI driver
> was created instead of adding support to the existing ehci platform
> driver because of the code required to workaround bugs in the EHCI
> controller.
>
> Signed-off-by: Al Cooper <alcooperx@...il.com>
> ---
...
> +static int __maybe_unused ehci_brcm_resume(struct device *dev)
> +{
> + struct usb_hcd *hcd = dev_get_drvdata(dev);
> + struct ehci_hcd *ehci = hcd_to_ehci(hcd);
> + struct brcm_priv *priv = hcd_to_ehci_priv(hcd);
> + int err;
> +
> + err = clk_prepare_enable(priv->clk);
> + if (err)
> + return err;
> + /*
> + * SWLINUX-1705: Avoid OUT packet underflows during high memory
> + * bus usage
> + * port_status[0x0f] = Broadcom-proprietary USB_EHCI_INSNREG00
> + * @ 0x90
> + */
> + ehci_writel(ehci, 0x00800040, &ehci->regs->port_status[0x10]);
> + ehci_writel(ehci, 0x00000001, &ehci->regs->port_status[0x12]);
> +
> + ehci_resume(hcd, false);
> + return 0;
> +}
One extra thing that came to my attention recently... Like all other
platform drivers, this has to set the runtime PM status of the
controller at the end of a system resume. See
https://marc.info/?l=linux-usb&m=158773611612885&w=2
for an example.
Alan Stern
Powered by blists - more mailing lists