Skip to content

Commit 1968f2b

Browse files
Shyam Sundar S Kjwrdegoede
authored andcommitted
platform/x86/amd/pmc: Add new acpi id for PMC controller
New version of PMC controller will have a separate ACPI id, add that to the support list. Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20220630050324.3780654-1-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 9ab762a commit 1968f2b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/platform/x86/amd-pmc.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
#define AMD_CPU_ID_PCO AMD_CPU_ID_RV
9292
#define AMD_CPU_ID_CZN AMD_CPU_ID_RN
9393
#define AMD_CPU_ID_YC 0x14B5
94+
#define AMD_CPU_ID_CB 0x14D8
9495

9596
#define PMC_MSG_DELAY_MIN_US 50
9697
#define RESPONSE_REGISTER_LOOP_MAX 20000
@@ -318,6 +319,7 @@ static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev,
318319
val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_CZN);
319320
break;
320321
case AMD_CPU_ID_YC:
322+
case AMD_CPU_ID_CB:
321323
val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC);
322324
break;
323325
default:
@@ -491,7 +493,7 @@ static void amd_pmc_dbgfs_register(struct amd_pmc_dev *dev)
491493
&amd_pmc_idlemask_fops);
492494
/* Enable STB only when the module_param is set */
493495
if (enable_stb) {
494-
if (dev->cpu_id == AMD_CPU_ID_YC)
496+
if (dev->cpu_id == AMD_CPU_ID_YC || dev->cpu_id == AMD_CPU_ID_CB)
495497
debugfs_create_file("stb_read", 0644, dev->dbgfs_dir, dev,
496498
&amd_pmc_stb_debugfs_fops_v2);
497499
else
@@ -615,6 +617,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
615617
return MSG_OS_HINT_PCO;
616618
case AMD_CPU_ID_RN:
617619
case AMD_CPU_ID_YC:
620+
case AMD_CPU_ID_CB:
618621
return MSG_OS_HINT_RN;
619622
}
620623
return -EINVAL;
@@ -735,6 +738,7 @@ static struct acpi_s2idle_dev_ops amd_pmc_s2idle_dev_ops = {
735738
#endif
736739

737740
static const struct pci_device_id pmc_pci_ids[] = {
741+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_CB) },
738742
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_YC) },
739743
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_CZN) },
740744
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RN) },
@@ -877,7 +881,7 @@ static int amd_pmc_probe(struct platform_device *pdev)
877881

878882
mutex_init(&dev->lock);
879883

880-
if (enable_stb && dev->cpu_id == AMD_CPU_ID_YC) {
884+
if (enable_stb && (dev->cpu_id == AMD_CPU_ID_YC || dev->cpu_id == AMD_CPU_ID_CB)) {
881885
err = amd_pmc_s2d_init(dev);
882886
if (err)
883887
return err;
@@ -915,6 +919,7 @@ static const struct acpi_device_id amd_pmc_acpi_ids[] = {
915919
{"AMDI0005", 0},
916920
{"AMDI0006", 0},
917921
{"AMDI0007", 0},
922+
{"AMDI0008", 0},
918923
{"AMD0004", 0},
919924
{"AMD0005", 0},
920925
{ }

0 commit comments

Comments
 (0)