[PATCH] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

Subsystems: the rest, usb subsystem, usb xhci driver

STALE1755d REVIEWED: 18 (18M)

3 review trailers.

3 messages, 2 authors, 2021-10-13 · open the first message on its own page

[PATCH] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

From: Nehal Bakulchandra Shah <hidden>
Date: 2021-09-20 15:41:28

AMD's Yellow Carp platform supports runtime power management for
XHCI Controllers, so enable the same by default for all XHCI Controllers.

Signed-off-by: Nehal Bakulchandra Shah <redacted>
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
---
 drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 2c9f25ca8edd..0e571d6af2ab 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -69,6 +69,12 @@
 #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI			0x1242
 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI			0x2142
 #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI			0x3242
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1	0x161a
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2	0x161b
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3	0x161d
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4	0x161e
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5	0x15d6
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6	0x15d7
 
 static const char hcd_name[] = "xhci_hcd";
 
@@ -313,6 +319,15 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 	     pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4))
 		xhci->quirks |= XHCI_NO_SOFT_RETRY;
 
+	if (pdev->vendor == PCI_VENDOR_ID_AMD &&
+	    (pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6))
+		xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
+
 	if (xhci->quirks & XHCI_RESET_ON_RESUME)
 		xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
 				"QUIRK: Resetting on resume");
-- 
2.25.1

Re: [PATCH] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

From: Shah, Nehal-bakulchandra <hidden>
Date: 2021-10-11 12:59:37

Hi

On 9/20/2021 9:11 PM, Nehal Bakulchandra Shah wrote:
quoted hunk
AMD's Yellow Carp platform supports runtime power management for
XHCI Controllers, so enable the same by default for all XHCI Controllers.

Signed-off-by: Nehal Bakulchandra Shah <redacted>
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
---
  drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
  1 file changed, 15 insertions(+)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 2c9f25ca8edd..0e571d6af2ab 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -69,6 +69,12 @@
  #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI			0x1242
  #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI			0x2142
  #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI			0x3242
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1	0x161a
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2	0x161b
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3	0x161d
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4	0x161e
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5	0x15d6
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6	0x15d7
  
  static const char hcd_name[] = "xhci_hcd";
  
@@ -313,6 +319,15 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
  	     pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4))
  		xhci->quirks |= XHCI_NO_SOFT_RETRY;
  
+	if (pdev->vendor == PCI_VENDOR_ID_AMD &&
+	    (pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6))
+		xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
+
  	if (xhci->quirks & XHCI_RESET_ON_RESUME)
  		xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
  				"QUIRK: Resetting on resume");
ping

Thanks
Nehal

Re: [PATCH] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

From: Mathias Nyman <hidden>
Date: 2021-10-13 15:17:02

On 11.10.2021 15.59, Shah, Nehal-bakulchandra wrote:
Hi

On 9/20/2021 9:11 PM, Nehal Bakulchandra Shah wrote:
quoted
AMD's Yellow Carp platform supports runtime power management for
XHCI Controllers, so enable the same by default for all XHCI Controllers.

Signed-off-by: Nehal Bakulchandra Shah <redacted>
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
---
  drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
  1 file changed, 15 insertions(+)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 2c9f25ca8edd..0e571d6af2ab 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -69,6 +69,12 @@
  #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI            0x1242
  #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI            0x2142
  #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI            0x3242
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1    0x161a
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2    0x161b
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3    0x161d
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4    0x161e
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5    0x15d6
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6    0x15d7
    static const char hcd_name[] = "xhci_hcd";
  @@ -313,6 +319,15 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
           pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4))
          xhci->quirks |= XHCI_NO_SOFT_RETRY;
  +    if (pdev->vendor == PCI_VENDOR_ID_AMD &&
+        (pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 ||
+        pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 ||
+        pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 ||
+        pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 ||
+        pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 ||
+        pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6))
+        xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
+
      if (xhci->quirks & XHCI_RESET_ON_RESUME)
          xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
                  "QUIRK: Resetting on resume");
ping
Now sent forward to Greg, thanks

-Mathias
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help