mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-28 23:50:26 +09:00
x86: Use a common definition of MSR_IA32_PERF_CTL
Remove the duplicate definition as it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
a827ba910c
commit
e2493a7f5a
@ -57,7 +57,7 @@ void set_max_freq(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
perf_ctl.hi = 0;
|
perf_ctl.hi = 0;
|
||||||
msr_write(IA32_PERF_CTL, perf_ctl);
|
msr_write(MSR_IA32_PERF_CTL, perf_ctl);
|
||||||
|
|
||||||
debug("CPU: frequency set to %d MHz\n",
|
debug("CPU: frequency set to %d MHz\n",
|
||||||
((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
|
((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
|
||||||
|
@ -357,7 +357,7 @@ static void set_max_ratio(void)
|
|||||||
msr = msr_read(MSR_PLATFORM_INFO);
|
msr = msr_read(MSR_PLATFORM_INFO);
|
||||||
perf_ctl.lo = msr.lo & 0xff00;
|
perf_ctl.lo = msr.lo & 0xff00;
|
||||||
}
|
}
|
||||||
msr_write(IA32_PERF_CTL, perf_ctl);
|
msr_write(MSR_IA32_PERF_CTL, perf_ctl);
|
||||||
|
|
||||||
debug("cpu: frequency set to %d\n",
|
debug("cpu: frequency set to %d\n",
|
||||||
((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
|
((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
|
||||||
|
@ -116,7 +116,7 @@ int cpu_intel_get_info(struct cpu_info *info, int bclk)
|
|||||||
{
|
{
|
||||||
msr_t msr;
|
msr_t msr;
|
||||||
|
|
||||||
msr = msr_read(IA32_PERF_CTL);
|
msr = msr_read(MSR_IA32_PERF_CTL);
|
||||||
info->cpu_freq = ((msr.lo >> 8) & 0xff) * bclk * 1000000;
|
info->cpu_freq = ((msr.lo >> 8) & 0xff) * bclk * 1000000;
|
||||||
info->features = 1 << CPU_FEAT_L1_CACHE | 1 << CPU_FEAT_MMU |
|
info->features = 1 << CPU_FEAT_L1_CACHE | 1 << CPU_FEAT_MMU |
|
||||||
1 << CPU_FEAT_UCODE | 1 << CPU_FEAT_DEVICE_ID;
|
1 << CPU_FEAT_UCODE | 1 << CPU_FEAT_DEVICE_ID;
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#ifndef __ASM_CPU_COMMON_H
|
#ifndef __ASM_CPU_COMMON_H
|
||||||
#define __ASM_CPU_COMMON_H
|
#define __ASM_CPU_COMMON_H
|
||||||
|
|
||||||
#define IA32_PERF_CTL 0x199
|
|
||||||
|
|
||||||
struct cpu_info;
|
struct cpu_info;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user