Commit 03c58a1e authored by Xi Pardee's avatar Xi Pardee Committed by Hans de Goede

platform/x86: intel/pmc: Move variable declarations and definitions to header and core.c

Move the msr_map variable declaration to core.h and move the pmc_lpm_modes
definition to core.c.

This is a prepartory patch for redesigning the pmc core driver as the
variables will be used in multiple PCH specific files.

Cc: David E Box <david.e.box@linux.intel.com>
Reviewed-by: default avatar"David E. Box" <david.e.box@linux.intel.com>
Signed-off-by: default avatarXi Pardee <xi.pardee@intel.com>
Signed-off-by: default avatar"David E. Box" <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20221114183257.2067662-3-gayatri.kammela@linux.intel.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 284c01b7
...@@ -35,8 +35,21 @@ ...@@ -35,8 +35,21 @@
#define ACPI_S0IX_DSM_UUID "57a6512e-3979-4e9d-9708-ff13b2508972" #define ACPI_S0IX_DSM_UUID "57a6512e-3979-4e9d-9708-ff13b2508972"
#define ACPI_GET_LOW_MODE_REGISTERS 1 #define ACPI_GET_LOW_MODE_REGISTERS 1
/* Maximum number of modes supported by platfoms that has low power mode capability */
const char *pmc_lpm_modes[] = {
"S0i2.0",
"S0i2.1",
"S0i2.2",
"S0i3.0",
"S0i3.1",
"S0i3.2",
"S0i3.3",
"S0i3.4",
NULL
};
/* PKGC MSRs are common across Intel Core SoCs */ /* PKGC MSRs are common across Intel Core SoCs */
static const struct pmc_bit_map msr_map[] = { const struct pmc_bit_map msr_map[] = {
{"Package C2", MSR_PKG_C2_RESIDENCY}, {"Package C2", MSR_PKG_C2_RESIDENCY},
{"Package C3", MSR_PKG_C3_RESIDENCY}, {"Package C3", MSR_PKG_C3_RESIDENCY},
{"Package C6", MSR_PKG_C6_RESIDENCY}, {"Package C6", MSR_PKG_C6_RESIDENCY},
......
...@@ -237,17 +237,7 @@ enum ppfear_regs { ...@@ -237,17 +237,7 @@ enum ppfear_regs {
#define ADL_LPM_STATUS_LATCH_EN_OFFSET 0x1704 #define ADL_LPM_STATUS_LATCH_EN_OFFSET 0x1704
#define ADL_LPM_LIVE_STATUS_OFFSET 0x1764 #define ADL_LPM_LIVE_STATUS_OFFSET 0x1764
static const char *pmc_lpm_modes[] = { extern const char *pmc_lpm_modes[];
"S0i2.0",
"S0i2.1",
"S0i2.2",
"S0i3.0",
"S0i3.1",
"S0i3.2",
"S0i3.3",
"S0i3.4",
NULL
};
struct pmc_bit_map { struct pmc_bit_map {
const char *name; const char *name;
...@@ -346,6 +336,7 @@ struct pmc_dev { ...@@ -346,6 +336,7 @@ struct pmc_dev {
void (*core_configure)(struct pmc_dev *pmcdev); void (*core_configure)(struct pmc_dev *pmcdev);
}; };
extern const struct pmc_bit_map msr_map[];
void spt_core_init(struct pmc_dev *pmcdev); void spt_core_init(struct pmc_dev *pmcdev);
void cnp_core_init(struct pmc_dev *pmcdev); void cnp_core_init(struct pmc_dev *pmcdev);
void icl_core_init(struct pmc_dev *pmcdev); void icl_core_init(struct pmc_dev *pmcdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment