Remove some duplicate #include files (trivial).
[coreboot.git] / src / cpu / intel / model_6ex / model_6ex_init.c
index 91cde9350e833c46324a98ea05db56a2a14ccddf..384b2bf68b8b9107cdcf88ead6e179c63f10c2d0 100644 (file)
@@ -30,7 +30,7 @@
 #include <cpu/intel/microcode.h>
 #include <cpu/intel/hyperthreading.h>
 #include <cpu/x86/cache.h>
-#include <cpu/x86/mtrr.h>
+#include <cpu/x86/name.h>
 #include <usbdebug.h>
 
 static const uint32_t microcode_updates[] = {
@@ -44,38 +44,6 @@ static const uint32_t microcode_updates[] = {
         0x0, 0x0, 0x0, 0x0,
 };
 
-static inline void strcpy(char *dst, char *src)
-{
-       while (*src) *dst++ = *src++;
-}
-
-static void fill_processor_name(char *processor_name)
-{
-       struct cpuid_result regs;
-       char temp_processor_name[49];
-       char *processor_name_start;
-       unsigned int *name_as_ints = (unsigned int *)temp_processor_name;
-       int i;
-
-       for (i=0; i<3; i++) {
-               regs = cpuid(0x80000002 + i);
-               name_as_ints[i*4 + 0] = regs.eax;
-               name_as_ints[i*4 + 1] = regs.ebx;
-               name_as_ints[i*4 + 2] = regs.ecx;
-               name_as_ints[i*4 + 3] = regs.edx;
-       }
-
-       temp_processor_name[48] = 0;
-
-       /* Skip leading spaces */
-       processor_name_start = temp_processor_name;
-       while (*processor_name_start == ' ')
-               processor_name_start++;
-
-       memset(processor_name, 0, 49);
-       strcpy(processor_name, processor_name_start);
-}
-
 #define IA32_FEATURE_CONTROL 0x003a
 
 #define CPUID_VMX (1 << 5)
@@ -184,7 +152,7 @@ static void configure_pic_thermal_sensors(void)
        wrmsr(PIC_SENS_CFG, msr);
 }
 
-#if CONFIG_USBDEBUG_DIRECT
+#if CONFIG_USBDEBUG
 static unsigned ehci_debug_addr;
 #endif
 
@@ -202,7 +170,7 @@ static void model_6ex_init(device_t cpu)
        fill_processor_name(processor_name);
        printk(BIOS_INFO, "CPU: %s.\n", processor_name);
 
-#if CONFIG_USBDEBUG_DIRECT
+#if CONFIG_USBDEBUG
        // Is this caution really needed?
        if(!ehci_debug_addr)
                ehci_debug_addr = get_ehci_debug();
@@ -213,7 +181,7 @@ static void model_6ex_init(device_t cpu)
        x86_setup_mtrrs(36);
        x86_mtrr_check();
 
-#if CONFIG_USBDEBUG_DIRECT
+#if CONFIG_USBDEBUG
        set_ehci_debug(ehci_debug_addr);
 #endif