soc/intel: Improve CONFIG_ACPI_SOC_INTEL_SLP_S0_FREQ_HZ use
Commit bd9c562a9e
("acpi: Configure
slp-s0 residency counter frequency in LPIT table") led to jenkins
reporting the following error:
!!!!! Error: defined(CONFIG_ACPI_SOC_INTEL_SLP_S0_FREQ_HZ)
used at src/include/acpi/acpi.h:457. Symbols of type 'hex'
are always defined.
Since hex Kconfig are always defined there is no need to test it being
defined but also no need to handle zero or non-zero values.
In addition:
1. This config was defined in Meteor Lake specific Kconfig file while
it should actually be define closer to where it is being used (here
soc/intel/common/block/acpi/Kconfig) and only set by the SoC Kconfig.
2. Once moved and under control of `SOC_INTEL_COMMON_BLOCK_ACPI_LPIT'
gating (lpit.c), the Kconfig name needed to be adjusted to better fit
its use.
3. Make Meteor Lake Kconfig sets the config but does not define it
anymore.
TEST=LPIT ACPI table Counter Frequency field is set to 0x2005 on rex
Change-Id: I2083c9209e61be6180cca2c9f74097e2f4b4ce9a
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78458
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
parent
7357f2a0ff
commit
74f5a3e8a0
|
@ -454,11 +454,6 @@ typedef struct acpi_lpi_desc_hdr {
|
||||||
} __packed acpi_lpi_desc_hdr_t;
|
} __packed acpi_lpi_desc_hdr_t;
|
||||||
|
|
||||||
#define ACPI_LPIT_CTR_FREQ_TSC 0
|
#define ACPI_LPIT_CTR_FREQ_TSC 0
|
||||||
#if defined CONFIG_ACPI_SOC_INTEL_SLP_S0_FREQ_HZ && CONFIG_ACPI_SOC_INTEL_SLP_S0_FREQ_HZ != 0
|
|
||||||
#define ACPI_LPIT_SLP_S0_FREQ CONFIG_ACPI_SOC_INTEL_SLP_S0_FREQ_HZ
|
|
||||||
#else
|
|
||||||
#define ACPI_LPIT_SLP_S0_FREQ 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* LPIT: Native C-state instruction based LPI structure */
|
/* LPIT: Native C-state instruction based LPI structure */
|
||||||
|
|
|
@ -65,3 +65,13 @@ config SOC_INTEL_UFS_LTR_DISQUALIFY
|
||||||
LTR needs to be disqualified for UFS in D3 to ensure PMC
|
LTR needs to be disqualified for UFS in D3 to ensure PMC
|
||||||
ignores LTR from UFS IP which is infinite.
|
ignores LTR from UFS IP which is infinite.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if SOC_INTEL_COMMON_BLOCK_ACPI_LPIT
|
||||||
|
|
||||||
|
config SOC_INTEL_COMMON_BLOCK_ACPI_SLP_S0_FREQ_HZ
|
||||||
|
hex
|
||||||
|
help
|
||||||
|
Define the slp_s0_residency frequency to be reported in the
|
||||||
|
LPIT ACPI table.
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
|
@ -56,7 +56,8 @@ unsigned long acpi_fill_lpit(unsigned long current)
|
||||||
sys_counter->residency_counter.bit_width = 32;
|
sys_counter->residency_counter.bit_width = 32;
|
||||||
sys_counter->residency_counter.space_id = ACPI_ADDRESS_SPACE_MEMORY;
|
sys_counter->residency_counter.space_id = ACPI_ADDRESS_SPACE_MEMORY;
|
||||||
sys_counter->residency_counter.access_size = ACPI_ACCESS_SIZE_DWORD_ACCESS;
|
sys_counter->residency_counter.access_size = ACPI_ACCESS_SIZE_DWORD_ACCESS;
|
||||||
sys_counter->counter_frequency = ACPI_LPIT_SLP_S0_FREQ;
|
sys_counter->counter_frequency =
|
||||||
|
CONFIG_SOC_INTEL_COMMON_BLOCK_ACPI_SLP_S0_FREQ_HZ;
|
||||||
|
|
||||||
/* Min. residency and worst-case latency (from FSP and vendor dumps) */
|
/* Min. residency and worst-case latency (from FSP and vendor dumps) */
|
||||||
sys_counter->min_residency = 30000; /* break-even: 30 ms */
|
sys_counter->min_residency = 30000; /* break-even: 30 ms */
|
||||||
|
|
|
@ -447,8 +447,7 @@ config SOC_INTEL_CSE_FW_PARTITION_CMOS_OFFSET
|
||||||
int
|
int
|
||||||
default 161
|
default 161
|
||||||
|
|
||||||
config ACPI_SOC_INTEL_SLP_S0_FREQ_HZ
|
config SOC_INTEL_COMMON_BLOCK_ACPI_SLP_S0_FREQ_HZ
|
||||||
hex
|
|
||||||
default 0x2005
|
default 0x2005
|
||||||
help
|
help
|
||||||
slp_s0_residency granularity in 122us ticks (i.e. ~8.2KHz) in Meteor Lake.
|
slp_s0_residency granularity in 122us ticks (i.e. ~8.2KHz) in Meteor Lake.
|
||||||
|
|
Loading…
Reference in New Issue