broadwell: Rename HASWELL_BCLK to CPU_BCLK

Make the name more generic since it applies to both haswell
and broadwell chips.

BUG=chrome-os-partner:28234
TEST=None

Change-Id: I46aa67e144deb79bd5348a4104da7dc0d0889329
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/198918
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Duncan Laurie 2014-05-01 11:30:52 -07:00 committed by chrome-internal-fetch
commit 65ac1a07ab
4 changed files with 9 additions and 8 deletions

View file

@ -237,7 +237,7 @@ static int generate_P_state_entries(int core, int cores_per_package)
/* Max Non-Turbo Ratio */
ratio_max = (msr.lo >> 8) & 0xff;
}
clock_max = ratio_max * HASWELL_BCLK;
clock_max = ratio_max * CPU_BCLK;
/* Calculate CPU TDP in mW */
msr = rdmsr(MSR_PKG_POWER_SKU_UNIT);
@ -301,7 +301,7 @@ static int generate_P_state_entries(int core, int cores_per_package)
/* Calculate power at this ratio */
power = calculate_power(power_max, ratio_max, ratio);
clock = ratio * HASWELL_BCLK;
clock = ratio * CPU_BCLK;
len_pss += acpigen_write_PSS_package(
clock, /*MHz*/

View file

@ -34,8 +34,8 @@
#define HASWELL_STEPPING_ULT_B0 0
#define HASWELL_STEPPING_ULT_C0 1
/* Haswell bus clock is fixed at 100MHz */
#define HASWELL_BCLK 100
/* CPU bus clock is fixed at 100MHz */
#define CPU_BCLK 100

View file

@ -636,8 +636,8 @@ static void set_max_ratio(void)
}
wrmsr(IA32_PERF_CTL, perf_ctl);
printk(BIOS_DEBUG, "haswell: frequency set to %d\n",
((perf_ctl.lo >> 8) & 0xff) * HASWELL_BCLK);
printk(BIOS_DEBUG, "cpu: frequency set to %d\n",
((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
}
static void set_energy_perf_bias(u8 policy)

View file

@ -20,12 +20,13 @@
#include <stdint.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/tsc.h>
#include "cpu/intel/haswell/haswell.h"
#include <broadwell/cpu.h>
#include <broadwell/msr.h>
unsigned long tsc_freq_mhz(void)
{
msr_t platform_info;
platform_info = rdmsr(MSR_PLATFORM_INFO);
return HASWELL_BCLK * ((platform_info.lo >> 8) & 0xff);
return CPU_BCLK * ((platform_info.lo >> 8) & 0xff);
}