hc
2024-05-10 ee930fffee469d076998274a2ca55e13dc1efb67
kernel/include/acpi/cppc_acpi.h
....@@ -1,14 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * CPPC (Collaborative Processor Performance Control) methods used
34 * by CPUfreq drivers.
45 *
56 * (C) Copyright 2014, 2015 Linaro Ltd.
67 * Author: Ashwin Chaugule <ashwin.chaugule@linaro.org>
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public License
10
- * as published by the Free Software Foundation; version 2
11
- * of the License.
128 */
139
1410 #ifndef _CPPC_ACPI_H
....@@ -20,7 +16,7 @@
2016 #include <acpi/pcc.h>
2117 #include <acpi/processor.h>
2218
23
-/* Support CPPCv2 and CPPCv3 */
19
+/* CPPCv2 and CPPCv3 support */
2420 #define CPPC_V2_REV 2
2521 #define CPPC_V3_REV 3
2622 #define CPPC_V2_NUM_ENT 21
....@@ -104,6 +100,7 @@
104100 * today.
105101 */
106102 struct cppc_perf_caps {
103
+ u32 guaranteed_perf;
107104 u32 highest_perf;
108105 u32 nominal_perf;
109106 u32 lowest_perf;
....@@ -136,10 +133,14 @@
136133 cpumask_var_t shared_cpu_map;
137134 };
138135
136
+extern int cppc_get_desired_perf(int cpunum, u64 *desired_perf);
139137 extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs);
140138 extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
141139 extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
142140 extern int acpi_get_psd_map(struct cppc_cpudata **);
143141 extern unsigned int cppc_get_transition_latency(int cpu);
142
+extern bool cpc_ffh_supported(void);
143
+extern int cpc_read_ffh(int cpunum, struct cpc_reg *reg, u64 *val);
144
+extern int cpc_write_ffh(int cpunum, struct cpc_reg *reg, u64 val);
144145
145146 #endif /* _CPPC_ACPI_H*/