[PATCH v2 1/3] usb: host: xhci-plat: Parse xhci-missing_cas_quirk and apply quirk

Frank Li posted 3 patches 1 year, 5 months ago
There is a newer version of this series
[PATCH v2 1/3] usb: host: xhci-plat: Parse xhci-missing_cas_quirk and apply quirk
Posted by Frank Li 1 year, 5 months ago
Parse software managed property 'xhci-skip-phy-init-quirk' and
'xhci-skip-phy-init-quirk' to apply related quirk. It allows usb glue layer
driver apply these quirk.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/usb/host/xhci-plat.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 31bdfa52eeb25..ecaa75718e592 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -259,6 +259,12 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
 		if (device_property_read_bool(tmpdev, "write-64-hi-lo-quirk"))
 			xhci->quirks |= XHCI_WRITE_64_HI_LO;
 
+		if (device_property_read_bool(tmpdev, "xhci-missing-cas-quirk"))
+			xhci->quirks |= XHCI_MISSING_CAS;
+
+		if (device_property_read_bool(tmpdev, "xhci-skip-phy-init-quirk"))
+			xhci->quirks |= XHCI_SKIP_PHY_INIT;
+
 		device_property_read_u32(tmpdev, "imod-interval-ns",
 					 &xhci->imod_interval);
 	}

-- 
2.34.1
Re: [PATCH v2 1/3] usb: host: xhci-plat: Parse xhci-missing_cas_quirk and apply quirk
Posted by Fabio Estevam 1 year, 5 months ago
Hi Frank,

On Wed, Aug 21, 2024 at 1:19 PM Frank Li <Frank.Li@nxp.com> wrote:
>
> Parse software managed property 'xhci-skip-phy-init-quirk' and
> 'xhci-skip-phy-init-quirk' to apply related quirk. It allows usb glue layer
> driver apply these quirk.

Please explain the reason in the commit log.

What does it fix? Why do we need these quirks? Or what does it improve?
Re: [PATCH v2 1/3] usb: host: xhci-plat: Parse xhci-missing_cas_quirk and apply quirk
Posted by Frank Li 1 year, 5 months ago
On Wed, Aug 21, 2024 at 06:16:18PM -0300, Fabio Estevam wrote:
> Hi Frank,
>
> On Wed, Aug 21, 2024 at 1:19 PM Frank Li <Frank.Li@nxp.com> wrote:
> >
> > Parse software managed property 'xhci-skip-phy-init-quirk' and
> > 'xhci-skip-phy-init-quirk' to apply related quirk. It allows usb glue layer
> > driver apply these quirk.
>
> Please explain the reason in the commit log.

XHCI_MISSING_CAS and XHCI_SKIP_PHY_INIT is already defined at
drivers/usb/host/xhci.h

This patch just add software manage dt property map to these exist quirk.

>
> What does it fix? Why do we need these quirks? Or what does it improve?

This one just add map dt property to driver existed quirk, not fix anything
in this patch.