diff options
author | Martin Roth <martin.roth@se-eng.com> | 2014-08-11 11:47:47 -0600 |
---|---|---|
committer | Martin Roth <gaumless@gmail.com> | 2014-08-18 02:22:09 +0200 |
commit | 9ff030fb252a84b0acf88c1af272831b7f2be928 (patch) | |
tree | f1e92528e19d5b0b47ba7b533c18b3d63445afbf /src/cpu/intel/fsp_model_406dx/model_406dx_init.c | |
parent | 7aa704b822008efbbd540e97ae73f1c7d95e2c7d (diff) |
cpu/intel/fsp_model_406dx: code cleanup
Code cleanup requested in commit 09670265 -
"cpu/intel: Add fsp version of model 406dx (Rangeley / Atom C2000)"
- add guard statements to chip.h
- remove excessive includes
- whitespace cleanup
- add an IS_ENABLED
Change-Id: Iaa85bd66953df015f083b23f6fd32949bcfd17bc
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: http://review.coreboot.org/6599
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/cpu/intel/fsp_model_406dx/model_406dx_init.c')
-rw-r--r-- | src/cpu/intel/fsp_model_406dx/model_406dx_init.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/cpu/intel/fsp_model_406dx/model_406dx_init.c b/src/cpu/intel/fsp_model_406dx/model_406dx_init.c index 61add22828..3a3628103c 100644 --- a/src/cpu/intel/fsp_model_406dx/model_406dx_init.c +++ b/src/cpu/intel/fsp_model_406dx/model_406dx_init.c @@ -22,19 +22,13 @@ */ #include <console/console.h> -#include <device/device.h> #include <device/pci.h> -#include <string.h> -#include <arch/acpi.h> #include <cpu/cpu.h> #include <cpu/x86/mtrr.h> #include <cpu/x86/msr.h> #include <cpu/x86/lapic.h> -#include <cpu/intel/speedstep.h> -#include <cpu/intel/turbo.h> #include <cpu/x86/cache.h> #include <cpu/x86/name.h> -#include <pc80/mc146818rtc.h> #include "model_406dx.h" #include "chip.h" @@ -42,7 +36,7 @@ static void enable_vmx(void) { struct cpuid_result regs; msr_t msr; - int enable = CONFIG_ENABLE_VMX; + int enable = IS_ENABLED(CONFIG_ENABLE_VMX); regs = cpuid(1); /* Check that the VMX is supported before reading or writing the MSR. */ @@ -67,9 +61,9 @@ static void enable_vmx(void) printk(BIOS_DEBUG, "%s VMX\n", enable ? "Enabling" : "Disabling"); if (enable) { - msr.lo |= (1 << 2); - if (regs.ecx & CPUID_SMX) - msr.lo |= (1 << 1); + msr.lo |= (1 << 2); + if (regs.ecx & CPUID_SMX) + msr.lo |= (1 << 1); } wrmsr(IA32_FEATURE_CONTROL, msr); @@ -93,9 +87,9 @@ static void configure_misc(void) msr_t msr; msr = rdmsr(IA32_MISC_ENABLE); - msr.lo |= (1 << 0); /* Fast String enable */ - msr.lo |= (1 << 3); /* TM1/TM2/EMTTM enable */ - msr.lo |= (1 << 16); /* Enhanced SpeedStep Enable */ + msr.lo |= (1 << 0); /* Fast String enable */ + msr.lo |= (1 << 3); /* TM1/TM2/EMTTM enable */ + msr.lo |= (1 << 16); /* Enhanced SpeedStep Enable */ wrmsr(IA32_MISC_ENABLE, msr); /* Disable Thermal interrupts */ |