]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/x86/amd/pmc: Notify user when platform does not support s0ix transition
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Wed, 5 Mar 2025 14:26:12 +0000 (19:56 +0530)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 7 Mar 2025 10:17:46 +0000 (12:17 +0200)
Some of the AMD platforms do not support modern standby, so when such
CPU ID is detected, a warning message will be displayed to the user.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20250305142615.410178-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/pmc/pmc.c
drivers/platform/x86/amd/pmc/pmc.h

index e6124498b195f51580e6cc9a0060d59d13a6be9b..c7c7afb8a43132c803fc76e2fa9f4995a2e13740 100644 (file)
@@ -808,6 +808,7 @@ static const struct pci_device_id pmc_pci_ids[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_PCO) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RV) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SP) },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SHP) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) },
        { }
@@ -832,7 +833,7 @@ static int amd_pmc_probe(struct platform_device *pdev)
 
        dev->cpu_id = rdev->device;
 
-       if (dev->cpu_id == AMD_CPU_ID_SP) {
+       if (dev->cpu_id == AMD_CPU_ID_SP || dev->cpu_id == AMD_CPU_ID_SHP) {
                dev_warn_once(dev->dev, "S0i3 is not supported on this hardware\n");
                err = -ENODEV;
                goto err_pci_dev_put;
index f43f0253b0f53e40303995d01baa37919de371f9..8f39988ce7a3a33df95d6ffa0f7187d40fe6db7a 100644 (file)
@@ -79,6 +79,7 @@ void amd_mp2_stb_deinit(struct amd_pmc_dev *dev);
 #define AMD_CPU_ID_CB                  0x14D8
 #define AMD_CPU_ID_PS                  0x14E8
 #define AMD_CPU_ID_SP                  0x14A4
+#define AMD_CPU_ID_SHP                 0x153A
 #define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
 #define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122
 #define PCI_DEVICE_ID_AMD_MP2_STB      0x172c