mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-05 05:15:23 +02:00

Allow to disable ACPI PM Timer on suspend and enable on resume. A disabled timer helps optimise power consumption when the system is suspended. On resume the timer is only reactivated if it was activated prior to suspend, so unless the ACPI PM timer is enabled in the BIOS, this won't change anything. The ACPI PM timer is used by Intel's iTCO/wdat_wdt watchdog to drive the watchdog, so it doesn't need to run during suspend. Signed-off-by: Marek Maslanka <mmaslanka@google.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240812184208.1080710-1-mmaslanka@google.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
70 lines
1.7 KiB
C
70 lines
1.7 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* This file contains platform specific structure definitions
|
|
* and init function used by Ice Lake PCH.
|
|
*
|
|
* Copyright (c) 2022, Intel Corporation.
|
|
* All Rights Reserved.
|
|
*
|
|
*/
|
|
|
|
#include "core.h"
|
|
|
|
const struct pmc_bit_map icl_pfear_map[] = {
|
|
{"RES_65", BIT(0)},
|
|
{"RES_66", BIT(1)},
|
|
{"RES_67", BIT(2)},
|
|
{"TAM", BIT(3)},
|
|
{"GBETSN", BIT(4)},
|
|
{"TBTLSX", BIT(5)},
|
|
{"RES_71", BIT(6)},
|
|
{"RES_72", BIT(7)},
|
|
{}
|
|
};
|
|
|
|
const struct pmc_bit_map *ext_icl_pfear_map[] = {
|
|
/*
|
|
* Check intel_pmc_core_ids[] users of icl_reg_map for
|
|
* a list of core SoCs using this.
|
|
*/
|
|
cnp_pfear_map,
|
|
icl_pfear_map,
|
|
NULL
|
|
};
|
|
|
|
const struct pmc_reg_map icl_reg_map = {
|
|
.pfear_sts = ext_icl_pfear_map,
|
|
.slp_s0_offset = CNP_PMC_SLP_S0_RES_COUNTER_OFFSET,
|
|
.slp_s0_res_counter_step = ICL_PMC_SLP_S0_RES_COUNTER_STEP,
|
|
.slps0_dbg_maps = cnp_slps0_dbg_maps,
|
|
.ltr_show_sts = cnp_ltr_show_map,
|
|
.msr_sts = msr_map,
|
|
.slps0_dbg_offset = CNP_PMC_SLPS0_DBG_OFFSET,
|
|
.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,
|
|
.acpi_pm_tmr_ctl_offset = SPT_PMC_ACPI_PM_TMR_CTL_OFFSET,
|
|
.acpi_pm_tmr_disable_bit = SPT_PMC_BIT_ACPI_PM_TMR_DISABLE,
|
|
.ltr_ignore_max = ICL_NUM_IP_IGN_ALLOWED,
|
|
.etr3_offset = ETR3_OFFSET,
|
|
};
|
|
|
|
int icl_core_init(struct pmc_dev *pmcdev)
|
|
{
|
|
struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
|
|
int ret;
|
|
|
|
pmc->map = &icl_reg_map;
|
|
|
|
ret = get_primary_reg_base(pmc);
|
|
if (ret)
|
|
return ret;
|
|
|
|
pmc_core_get_low_power_modes(pmcdev);
|
|
|
|
return ret;
|
|
}
|