usb: xhci: xhci-plat: Support for Phytium Pe220x

Add XHCI_RESET_ON_RESUME quirk for Phytium Pe220x
Phytium Pe220x xHCI host controller does not have suspend/resume
support. Therefore, use of the XHCI_RESET_ON_RESUME quirk is
mandatory in order to avoid failures after resume.

Signed-off-by: wangzhimin <wangzhimin1179@phytium.com.cn>
(cherry picked from commit 33d50ca483)
Signed-off-by: Alex Shi <alexsshi@tencent.com>
This commit is contained in:
wangzhimin 2023-05-12 04:05:59 -04:00 committed by Jianping Liu
parent 3523026413
commit 666b19bb8a
1 changed files with 13 additions and 1 deletions

View File

@ -123,6 +123,10 @@ static const struct xhci_plat_priv xhci_plat_renesas_rcar_gen3 = {
SET_XHCI_PLAT_PRIV_FOR_RCAR(XHCI_RCAR_FIRMWARE_NAME_V3)
};
static const struct xhci_plat_priv xhci_plat_phytium_pe220x = {
.quirks = XHCI_RESET_ON_RESUME,
};
static const struct of_device_id usb_xhci_of_match[] = {
{
.compatible = "generic-xhci",
@ -158,6 +162,9 @@ static const struct of_device_id usb_xhci_of_match[] = {
}, {
.compatible = "renesas,rcar-gen3-xhci",
.data = &xhci_plat_renesas_rcar_gen3,
}, {
.compatible = "phytium,pe220x-xhci",
.data = &xhci_plat_phytium_pe220x,
},
{},
};
@ -268,7 +275,11 @@ static int xhci_plat_probe(struct platform_device *pdev)
if (ret)
goto disable_reg_clk;
priv_match = of_device_get_match_data(&pdev->dev);
if (has_acpi_companion(&pdev->dev))
priv_match = acpi_device_get_match_data(&pdev->dev);
else
priv_match = of_device_get_match_data(&pdev->dev);
if (priv_match) {
priv = hcd_to_xhci_priv(hcd);
/* Just copy data for now */
@ -462,6 +473,7 @@ static const struct dev_pm_ops xhci_plat_pm_ops = {
static const struct acpi_device_id usb_xhci_acpi_match[] = {
/* XHCI-compliant USB Controller */
{ "PNP0D10", },
{ "PHYT0039", (kernel_ulong_t)&xhci_plat_phytium_pe220x },
{ }
};
MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match);