-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
platform/x86: intel/pmc/core: Add Meteor Lake support to pmc core driver
Add Meteor Lake client and mobile support to pmc core driver. This patch adds legacy support. Cc: David E Box <david.e.box@linux.intel.com> Suggested-by: David E Box <david.e.box@linux.intel.com> Reviewed-by: "David E. Box" <david.e.box@linux.intel.com> Signed-off-by: Sukumar Ghorai <sukumar.ghorai@intel.com> Signed-off-by: Gayatri Kammela <gayatri.kammela@linux.intel.com> Signed-off-by: "David E. Box" <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20221114183257.2067662-9-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
- Loading branch information
Gayatri Kammela
authored and
Hans de Goede
committed
Nov 21, 2022
1 parent
0887688
commit c5ad454
Showing
4 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* This file contains platform specific structure definitions | ||
* and init function used by Meteor Lake PCH. | ||
* | ||
* Copyright (c) 2022, Intel Corporation. | ||
* All Rights Reserved. | ||
* | ||
*/ | ||
|
||
#include "core.h" | ||
|
||
const struct pmc_reg_map mtl_reg_map = { | ||
.pfear_sts = ext_tgl_pfear_map, | ||
.slp_s0_offset = CNP_PMC_SLP_S0_RES_COUNTER_OFFSET, | ||
.slp_s0_res_counter_step = TGL_PMC_SLP_S0_RES_COUNTER_STEP, | ||
.ltr_show_sts = adl_ltr_show_map, | ||
.msr_sts = msr_map, | ||
.ltr_ignore_offset = CNP_PMC_LTR_IGNORE_OFFSET, | ||
.regmap_length = CNP_PMC_MMIO_REG_LEN, | ||
.ppfear0_offset = CNP_PMC_HOST_PPFEAR0A, | ||
.ppfear_buckets = ICL_PPFEAR_NUM_ENTRIES, | ||
.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET, | ||
.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT, | ||
.ltr_ignore_max = ADL_NUM_IP_IGN_ALLOWED, | ||
.lpm_num_modes = ADL_LPM_NUM_MODES, | ||
.lpm_num_maps = ADL_LPM_NUM_MAPS, | ||
.lpm_res_counter_step_x2 = TGL_PMC_LPM_RES_COUNTER_STEP_X2, | ||
.etr3_offset = ETR3_OFFSET, | ||
.lpm_sts_latch_en_offset = MTL_LPM_STATUS_LATCH_EN_OFFSET, | ||
.lpm_priority_offset = MTL_LPM_PRI_OFFSET, | ||
.lpm_en_offset = MTL_LPM_EN_OFFSET, | ||
.lpm_residency_offset = MTL_LPM_RESIDENCY_OFFSET, | ||
.lpm_sts = adl_lpm_maps, | ||
.lpm_status_offset = MTL_LPM_STATUS_OFFSET, | ||
.lpm_live_status_offset = MTL_LPM_LIVE_STATUS_OFFSET, | ||
}; | ||
|
||
void mtl_core_configure(struct pmc_dev *pmcdev) | ||
{ | ||
/* Due to a hardware limitation, the GBE LTR blocks PC10 | ||
* when a cable is attached. Tell the PMC to ignore it. | ||
*/ | ||
dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); | ||
pmc_core_send_ltr_ignore(pmcdev, 3); | ||
} | ||
|
||
void mtl_core_init(struct pmc_dev *pmcdev) | ||
{ | ||
pmcdev->map = &mtl_reg_map; | ||
pmcdev->core_configure = mtl_core_configure; | ||
} |