summaryrefslogtreecommitdiff
path: root/src/soc/amd/picasso
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/picasso')
-rw-r--r--src/soc/amd/picasso/Kconfig1
-rw-r--r--src/soc/amd/picasso/acpi.c39
-rw-r--r--src/soc/amd/picasso/include/soc/msr.h5
3 files changed, 1 insertions, 44 deletions
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig
index 746b4fb87d..d59444c868 100644
--- a/src/soc/amd/picasso/Kconfig
+++ b/src/soc/amd/picasso/Kconfig
@@ -36,6 +36,7 @@ config SOC_AMD_PICASSO
select SOC_AMD_COMMON_BLOCK_AOAC
select SOC_AMD_COMMON_BLOCK_APOB
select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS
+ select SOC_AMD_COMMON_BLOCK_CPUFREQ_FAM17H_19H
select SOC_AMD_COMMON_BLOCK_DATA_FABRIC
select SOC_AMD_COMMON_BLOCK_GRAPHICS
select SOC_AMD_COMMON_BLOCK_HAS_ESPI
diff --git a/src/soc/amd/picasso/acpi.c b/src/soc/amd/picasso/acpi.c
index 2379d4347b..a6f1ebd4e4 100644
--- a/src/soc/amd/picasso/acpi.c
+++ b/src/soc/amd/picasso/acpi.c
@@ -11,7 +11,6 @@
#include <arch/ioapic.h>
#include <arch/smp/mpspec.h>
#include <cpu/amd/cpuid.h>
-#include <cpu/amd/msr.h>
#include <cpu/x86/smm.h>
#include <device/device.h>
#include <device/pci.h>
@@ -23,7 +22,6 @@
#include <amdblocks/ioapic.h>
#include <soc/acpi.h>
#include <soc/pci_devs.h>
-#include <soc/msr.h>
#include <soc/southbridge.h>
#include <version.h>
#include "chip.h"
@@ -99,43 +97,6 @@ void acpi_fill_fadt(acpi_fadt_t *fadt)
fadt->flags |= cfg->fadt_flags; /* additional board-specific flags */
}
-uint32_t get_pstate_core_freq(union pstate_msr pstate_reg)
-{
- uint32_t core_freq, core_freq_mul, core_freq_div;
- bool valid_freq_divisor;
-
- /* Core frequency multiplier */
- core_freq_mul = pstate_reg.cpu_fid_0_7;
-
- /* Core frequency divisor ID */
- core_freq_div = pstate_reg.cpu_dfs_id;
-
- if (core_freq_div == 0) {
- return 0;
- } else if ((core_freq_div >= PSTATE_DEF_FREQ_DIV_MIN)
- && (core_freq_div <= PSTATE_DEF_EIGHTH_STEP_MAX)) {
- /* Allow 1/8 integer steps for this range */
- valid_freq_divisor = true;
- } else if ((core_freq_div > PSTATE_DEF_EIGHTH_STEP_MAX)
- && (core_freq_div <= PSTATE_DEF_FREQ_DIV_MAX) && !(core_freq_div & 0x1)) {
- /* Only allow 1/4 integer steps for this range */
- valid_freq_divisor = true;
- } else {
- valid_freq_divisor = false;
- }
-
- if (valid_freq_divisor) {
- /* 25 * core_freq_mul / (core_freq_div / 8) */
- core_freq =
- ((PSTATE_DEF_CORE_FREQ_BASE * core_freq_mul * 8) / (core_freq_div));
- } else {
- printk(BIOS_WARNING, "Undefined core_freq_div %x used. Force to 1.\n",
- core_freq_div);
- core_freq = (PSTATE_DEF_CORE_FREQ_BASE * core_freq_mul);
- }
- return core_freq;
-}
-
const acpi_cstate_t cstate_cfg_table[] = {
[0] = {
.ctype = 1,
diff --git a/src/soc/amd/picasso/include/soc/msr.h b/src/soc/amd/picasso/include/soc/msr.h
index 0747b847e3..ce84eecce1 100644
--- a/src/soc/amd/picasso/include/soc/msr.h
+++ b/src/soc/amd/picasso/include/soc/msr.h
@@ -21,9 +21,4 @@ union pstate_msr {
uint64_t raw;
};
-#define PSTATE_DEF_FREQ_DIV_MIN 0x8
-#define PSTATE_DEF_EIGHTH_STEP_MAX 0x1A
-#define PSTATE_DEF_FREQ_DIV_MAX 0x3E
-#define PSTATE_DEF_CORE_FREQ_BASE 25
-
#endif /* AMD_PICASSO_MSR_H */