From 4773e77cdc9b3af93ee1ae7bcf2acf94fde17166 Mon Sep 17 00:00:00 2001 From: Prashanth Prakash Date: Wed, 4 Apr 2018 12:14:50 -0600 Subject: ACPI / CPPC: Add support for CPPC v3 CPPC V3 introduces two new entries to make it easier to convert between abstract processor performance and frequency. The two new entries are lowest frequency and nominal frequency. These are the frequencies corresponding to lowest and nominal abstract performance. Add support to read the new entries and populate them as part of the CPPC performance capabilities which can be used by cpufreq drivers Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki --- include/acpi/cppc_acpi.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h index 2010c0516f27..8e0b8250a139 100644 --- a/include/acpi/cppc_acpi.h +++ b/include/acpi/cppc_acpi.h @@ -20,14 +20,16 @@ #include #include -/* Only support CPPCv2 for now. */ -#define CPPC_NUM_ENT 21 -#define CPPC_REV 2 +/* Support CPPCv2 and CPPCv3 */ +#define CPPC_V2_REV 2 +#define CPPC_V3_REV 3 +#define CPPC_V2_NUM_ENT 21 +#define CPPC_V3_NUM_ENT 23 #define PCC_CMD_COMPLETE_MASK (1 << 0) #define PCC_ERROR_MASK (1 << 2) -#define MAX_CPC_REG_ENT 19 +#define MAX_CPC_REG_ENT 21 /* CPPC specific PCC commands. */ #define CMD_READ 0 @@ -91,6 +93,8 @@ enum cppc_regs { AUTO_ACT_WINDOW, ENERGY_PERF, REFERENCE_PERF, + LOWEST_FREQ, + NOMINAL_FREQ, }; /* @@ -104,6 +108,8 @@ struct cppc_perf_caps { u32 nominal_perf; u32 lowest_perf; u32 lowest_nonlinear_perf; + u32 lowest_freq; + u32 nominal_freq; }; struct cppc_perf_ctrls { -- cgit v1.2.3-59-g8ed1b