diff options
author | Simon Glass | 2019-09-25 08:56:36 -0600 |
---|---|---|
committer | Bin Meng | 2019-10-08 13:57:46 +0800 |
commit | 246ac08b037befab08805750049df75044ab7f6c (patch) | |
tree | a27f7ed04b34bfb7062f697d98eaf32630b9b2fd /arch/x86/include/asm | |
parent | e2493a7f5a06854d45175a4aa356ba3a2d810300 (diff) |
x86: Add a common function to set CPU thermal target
This code appears in a few places, so move it to a common file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/cpu_common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cpu_common.h b/arch/x86/include/asm/cpu_common.h index 7ae3bd1c535..e158c96ce6a 100644 --- a/arch/x86/include/asm/cpu_common.h +++ b/arch/x86/include/asm/cpu_common.h @@ -45,4 +45,15 @@ int cpu_set_flex_ratio_to_tdp_nominal(void); */ int cpu_intel_get_info(struct cpu_info *info, int bclk_mz); +/** + * cpu_configure_thermal_target() - Set the thermal target for a CPU + * + * This looks up the tcc-offset property and uses it to set the + * MSR_TEMPERATURE_TARGET value. + * + * @dev: CPU device + * @return 0 if OK, -ENOENT if no target is given in device tree + */ +int cpu_configure_thermal_target(struct udevice *dev); + #endif |