platform/x86/intel/pmc: Move common code to core.c
authorRajvi Jingar <rajvi.jingar@linux.intel.com>
Tue, 19 Dec 2023 04:22:13 +0000 (20:22 -0800)
committerHans de Goede <hdegoede@redhat.com>
Tue, 19 Dec 2023 15:48:24 +0000 (16:48 +0100)
commitd79c3c82ee82cc99ffde4c4f5fe69db35bcfb733
tree523d95056fd85af3ce63924e998a42ffce0f1441
parentd873f380525c502904737f592008d509cff20c78
platform/x86/intel/pmc: Move common code to core.c

Functions like mtl_set_device_d3() and mtl_punit_pmt_init() were added for
Meteor Lake. To be able to use them in Arrow Lake and future platforms,
move them to core.c.

Also, to support different guids, add guid argument in
pmc_core_punit_pmt_init() and to support different PCI function numbers,
add func arg in pmc_core_ssram_init().

Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com>
Link: https://lore.kernel.org/r/20231219042216.2592029-5-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/pmc/core.c
drivers/platform/x86/intel/pmc/core.h
drivers/platform/x86/intel/pmc/core_ssram.c
drivers/platform/x86/intel/pmc/mtl.c