mbox series

[0/2] usb: dwc3: Disable susphy during initialization

Message ID cover.1713310411.git.Thinh.Nguyen@synopsys.com
Headers show
Series usb: dwc3: Disable susphy during initialization | expand

Message

Thinh Nguyen April 16, 2024, 11:41 p.m. UTC
We notice some platforms set "snps,dis_u3_susphy_quirk" and
"snps,dis_u2_susphy_quirk" when they should not need to. Just make sure that
the GUSB3PIPECTL.SUSPENDENABLE and GUSB2PHYCFG.SUSPHY are clear during
initialization. The host initialization involved xhci. So the dwc3 needs to
implement the xhci_plat_priv->plat_start() for xhci to re-enable the suspend
bits.

Since there's a prerequisite patch to drivers/usb/host/xhci-plat.h that's not a
fix patch, this series should go on Greg's usb-testing branch instead of
usb-linus.



Thinh Nguyen (2):
  usb: xhci-plat: Don't include xhci.h
  usb: dwc3: core: Prevent phy suspend during init

 drivers/usb/dwc3/core.c      | 90 +++++++++++++++---------------------
 drivers/usb/dwc3/core.h      |  1 +
 drivers/usb/dwc3/gadget.c    |  2 +
 drivers/usb/dwc3/host.c      | 27 +++++++++++
 drivers/usb/host/xhci-plat.h |  4 +-
 5 files changed, 71 insertions(+), 53 deletions(-)


base-commit: 3d122e6d27e417a9fa91181922743df26b2cd679

Comments

Greg Kroah-Hartman April 17, 2024, 11:08 a.m. UTC | #1
On Tue, Apr 16, 2024 at 11:41:36PM +0000, Thinh Nguyen wrote:
> The xhci_plat.h should not need to include the entire xhci.h header.
> This can cause redefinition in dwc3 if it selectively includes some xHCI
> definitions. This is a prerequisite change for a fix to disable suspend
> during initialization for dwc3.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> ---
>  drivers/usb/host/xhci-plat.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/xhci-plat.h b/drivers/usb/host/xhci-plat.h
> index 2d15386f2c50..6475130eac4b 100644
> --- a/drivers/usb/host/xhci-plat.h
> +++ b/drivers/usb/host/xhci-plat.h
> @@ -8,7 +8,9 @@
>  #ifndef _XHCI_PLAT_H
>  #define _XHCI_PLAT_H
>  
> -#include "xhci.h"	/* for hcd_to_xhci() */
> +struct device;
> +struct platform_device;
> +struct usb_hcd;
>  
>  struct xhci_plat_priv {
>  	const char *firmware_name;
> -- 
> 2.28.0
> 

Seems to break the build :(