Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Simon Glass | 780ba48 | 2016-03-11 22:06:58 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2016 Google, Inc |
Simon Glass | 780ba48 | 2016-03-11 22:06:58 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __ASM_CPU_COMMON_H |
| 7 | #define __ASM_CPU_COMMON_H |
| 8 | |
Simon Glass | aba3c60 | 2019-09-25 08:11:35 -0600 | [diff] [blame] | 9 | struct cpu_info; |
| 10 | |
Simon Glass | 780ba48 | 2016-03-11 22:06:58 -0700 | [diff] [blame] | 11 | /** |
| 12 | * cpu_common_init() - Set up common CPU init |
| 13 | * |
| 14 | * This reports BIST failure, enables the LAPIC, updates microcode, enables |
| 15 | * the upper 128-bytes of CROM RAM, probes the northbridge, PCH, LPC and SATA. |
| 16 | * |
| 17 | * @return 0 if OK, -ve on error |
| 18 | */ |
| 19 | int cpu_common_init(void); |
| 20 | |
| 21 | /** |
| 22 | * cpu_set_flex_ratio_to_tdp_nominal() - Set up the maximum non-turbo rate |
| 23 | * |
| 24 | * If a change is needed, this function will do a soft reset so it takes |
| 25 | * effect. |
| 26 | * |
| 27 | * Some details are available here: |
| 28 | * http://forum.hwbot.org/showthread.php?t=76092 |
| 29 | * |
| 30 | * @return 0 if OK, -ve on error |
| 31 | */ |
| 32 | int cpu_set_flex_ratio_to_tdp_nominal(void); |
| 33 | |
Simon Glass | aba3c60 | 2019-09-25 08:11:35 -0600 | [diff] [blame] | 34 | /** |
| 35 | * cpu_intel_get_info() - Obtain CPU info for Intel CPUs |
| 36 | * |
| 37 | * Most Intel CPUs use the same MSR to obtain the clock speed, and use the same |
| 38 | * features. This function fills in these values, given the value of the base |
| 39 | * clock in MHz (typically this should be set to 100). |
| 40 | * |
| 41 | * @info: cpu_info struct to fill in |
| 42 | * @bclk_mz: the base clock in MHz |
| 43 | * |
| 44 | * @return 0 always |
| 45 | */ |
| 46 | int cpu_intel_get_info(struct cpu_info *info, int bclk_mz); |
| 47 | |
Simon Glass | 780ba48 | 2016-03-11 22:06:58 -0700 | [diff] [blame] | 48 | #endif |