Skip to content

Commit 035c8a9

Browse files
Shyam Sundar S Kjwrdegoede
authored andcommitted
platform/x86/amd/pmc: Add new platform support
PMC driver can be supported on a new upcoming platform. Add this information 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-2-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 221b8b2 commit 035c8a9

File tree

1 file changed

+6
-1
lines changed
  • drivers/platform/x86/amd

1 file changed

+6
-1
lines changed

drivers/platform/x86/amd/pmc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
#define AMD_CPU_ID_CZN AMD_CPU_ID_RN
9393
#define AMD_CPU_ID_YC 0x14B5
9494
#define AMD_CPU_ID_CB 0x14D8
95+
#define AMD_CPU_ID_PS 0x14E8
9596

9697
#define PMC_MSG_DELAY_MIN_US 50
9798
#define RESPONSE_REGISTER_LOOP_MAX 20000
@@ -320,6 +321,7 @@ static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev,
320321
break;
321322
case AMD_CPU_ID_YC:
322323
case AMD_CPU_ID_CB:
324+
case AMD_CPU_ID_PS:
323325
val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC);
324326
break;
325327
default:
@@ -493,7 +495,8 @@ static void amd_pmc_dbgfs_register(struct amd_pmc_dev *dev)
493495
&amd_pmc_idlemask_fops);
494496
/* Enable STB only when the module_param is set */
495497
if (enable_stb) {
496-
if (dev->cpu_id == AMD_CPU_ID_YC || dev->cpu_id == AMD_CPU_ID_CB)
498+
if (dev->cpu_id == AMD_CPU_ID_YC || dev->cpu_id == AMD_CPU_ID_CB ||
499+
dev->cpu_id == AMD_CPU_ID_PS)
497500
debugfs_create_file("stb_read", 0644, dev->dbgfs_dir, dev,
498501
&amd_pmc_stb_debugfs_fops_v2);
499502
else
@@ -618,6 +621,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
618621
case AMD_CPU_ID_RN:
619622
case AMD_CPU_ID_YC:
620623
case AMD_CPU_ID_CB:
624+
case AMD_CPU_ID_PS:
621625
return MSG_OS_HINT_RN;
622626
}
623627
return -EINVAL;
@@ -738,6 +742,7 @@ static struct acpi_s2idle_dev_ops amd_pmc_s2idle_dev_ops = {
738742
#endif
739743

740744
static const struct pci_device_id pmc_pci_ids[] = {
745+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_PS) },
741746
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_CB) },
742747
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_YC) },
743748
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_CZN) },

0 commit comments

Comments
 (0)