summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel/pmc/mtl.c
diff options
context:
space:
mode:
authorDavid E. Box <david.e.box@linux.intel.com>2023-06-14 00:53:44 +0200
committerHans de Goede <hdegoede@redhat.com>2023-06-20 12:51:08 +0200
commit1b8c7b843c0043dd1b81e162e5b5fbed4b256896 (patch)
tree804f7c29d64f920f9f9411b395f36549b8b3bc36 /drivers/platform/x86/intel/pmc/mtl.c
parentplatform/x86:intel/pmc: Enable debugfs multiple PMC support (diff)
downloadlinux-1b8c7b843c0043dd1b81e162e5b5fbed4b256896.tar.xz
linux-1b8c7b843c0043dd1b81e162e5b5fbed4b256896.zip
platform/x86:intel/pmc: Discover PMC devices
On platforms with multiple PMCs, additional PMC devices are discovered in the SSRAM device associated with the primary PMC. Add support for discovering PMC devices from SSRAM. Use PMC devid to assign the corresponding register map. Signed-off-by: Xi Pardee <xi.pardee@intel.com> Signed-off-by: David E. Box <david.e.box@linux.intel.com> Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230613225347.2720665-6-rajvi.jingar@linux.intel.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/intel/pmc/mtl.c')
-rw-r--r--drivers/platform/x86/intel/pmc/mtl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c
index 69df6d7fee56..e53dc7900dbf 100644
--- a/drivers/platform/x86/intel/pmc/mtl.c
+++ b/drivers/platform/x86/intel/pmc/mtl.c
@@ -467,6 +467,10 @@ const struct pmc_reg_map mtl_socm_reg_map = {
.lpm_live_status_offset = MTL_LPM_LIVE_STATUS_OFFSET,
};
+static struct pmc_info mtl_pmc_info_list[] = {
+ {}
+};
+
#define MTL_GNA_PCI_DEV 0x7e4c
#define MTL_IPU_PCI_DEV 0x7d19
#define MTL_VPU_PCI_DEV 0x7d1d
@@ -517,6 +521,9 @@ int mtl_core_init(struct pmc_dev *pmcdev)
pmcdev->resume = mtl_resume;
+ pmcdev->regmap_list = mtl_pmc_info_list;
+ pmc_core_ssram_init(pmcdev);
+
ret = get_primary_reg_base(pmc);
if (ret)
return ret;