Message ID | 20190925145750.200592-52-sjg@chromium.org |
---|---|
State | Accepted |
Commit | e2493a7f5a06854d45175a4aa356ba3a2d810300 |
Delegated to: | Bin Meng |
Headers | show |
Series | x86: Add initial support for apollolake | expand |
On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote: > > Remove the duplicate definition as it is not needed. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > arch/x86/cpu/broadwell/cpu.c | 2 +- > arch/x86/cpu/broadwell/cpu_full.c | 2 +- > arch/x86/cpu/intel_common/cpu.c | 2 +- > arch/x86/include/asm/cpu_common.h | 2 -- > 4 files changed, 3 insertions(+), 5 deletions(-) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
On Mon, Oct 7, 2019 at 12:08 AM Bin Meng <bmeng.cn@gmail.com> wrote: > > On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote: > > > > Remove the duplicate definition as it is not needed. > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > --- > > > > arch/x86/cpu/broadwell/cpu.c | 2 +- > > arch/x86/cpu/broadwell/cpu_full.c | 2 +- > > arch/x86/cpu/intel_common/cpu.c | 2 +- > > arch/x86/include/asm/cpu_common.h | 2 -- > > 4 files changed, 3 insertions(+), 5 deletions(-) > > > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> applied to u-boot-x86/next, thanks!
diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c index 297f1e0b682..61003a6d68f 100644 --- a/arch/x86/cpu/broadwell/cpu.c +++ b/arch/x86/cpu/broadwell/cpu.c @@ -57,7 +57,7 @@ void set_max_freq(void) } 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", ((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK); diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c index 9686cf5e0e7..0e3d8781392 100644 --- a/arch/x86/cpu/broadwell/cpu_full.c +++ b/arch/x86/cpu/broadwell/cpu_full.c @@ -357,7 +357,7 @@ static void set_max_ratio(void) msr = msr_read(MSR_PLATFORM_INFO); 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", ((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK); diff --git a/arch/x86/cpu/intel_common/cpu.c b/arch/x86/cpu/intel_common/cpu.c index 9357626b5a6..3a0d505a321 100644 --- a/arch/x86/cpu/intel_common/cpu.c +++ b/arch/x86/cpu/intel_common/cpu.c @@ -116,7 +116,7 @@ int cpu_intel_get_info(struct cpu_info *info, int bclk) { 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->features = 1 << CPU_FEAT_L1_CACHE | 1 << CPU_FEAT_MMU | 1 << CPU_FEAT_UCODE | 1 << CPU_FEAT_DEVICE_ID; diff --git a/arch/x86/include/asm/cpu_common.h b/arch/x86/include/asm/cpu_common.h index 0d560262d5a..eb922da2ab8 100644 --- a/arch/x86/include/asm/cpu_common.h +++ b/arch/x86/include/asm/cpu_common.h @@ -6,8 +6,6 @@ #ifndef __ASM_CPU_COMMON_H #define __ASM_CPU_COMMON_H -#define IA32_PERF_CTL 0x199 - struct cpu_info; /**
Remove the duplicate definition as it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org> --- arch/x86/cpu/broadwell/cpu.c | 2 +- arch/x86/cpu/broadwell/cpu_full.c | 2 +- arch/x86/cpu/intel_common/cpu.c | 2 +- arch/x86/include/asm/cpu_common.h | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-)