|
@@ -35,6 +35,8 @@
|
|
|
#include <asm/apb_timer.h>
|
|
|
#include <asm/reboot.h>
|
|
|
|
|
|
+#include "intel_mid_weak_decls.h"
|
|
|
+
|
|
|
/*
|
|
|
* the clockevent devices on Moorestown/Medfield can be APBT or LAPIC clock,
|
|
|
* cmdline option x86_intel_mid_timer can be used to override the configuration
|
|
@@ -61,46 +63,11 @@ enum intel_mid_timer_options intel_mid_timer_options;
|
|
|
enum intel_mid_cpu_type __intel_mid_cpu_chip;
|
|
|
EXPORT_SYMBOL_GPL(__intel_mid_cpu_chip);
|
|
|
|
|
|
-static void intel_mid_power_off(void)
|
|
|
-{
|
|
|
-}
|
|
|
-
|
|
|
static void intel_mid_reboot(void)
|
|
|
{
|
|
|
intel_scu_ipc_simple_command(IPCMSG_COLD_BOOT, 0);
|
|
|
}
|
|
|
|
|
|
-static unsigned long __init intel_mid_calibrate_tsc(void)
|
|
|
-{
|
|
|
- unsigned long fast_calibrate;
|
|
|
- u32 lo, hi, ratio, fsb;
|
|
|
-
|
|
|
- rdmsr(MSR_IA32_PERF_STATUS, lo, hi);
|
|
|
- pr_debug("IA32 perf status is 0x%x, 0x%0x\n", lo, hi);
|
|
|
- ratio = (hi >> 8) & 0x1f;
|
|
|
- pr_debug("ratio is %d\n", ratio);
|
|
|
- if (!ratio) {
|
|
|
- pr_err("read a zero ratio, should be incorrect!\n");
|
|
|
- pr_err("force tsc ratio to 16 ...\n");
|
|
|
- ratio = 16;
|
|
|
- }
|
|
|
- rdmsr(MSR_FSB_FREQ, lo, hi);
|
|
|
- if ((lo & 0x7) == 0x7)
|
|
|
- fsb = PENWELL_FSB_FREQ_83SKU;
|
|
|
- else
|
|
|
- fsb = PENWELL_FSB_FREQ_100SKU;
|
|
|
- fast_calibrate = ratio * fsb;
|
|
|
- pr_debug("read penwell tsc %lu khz\n", fast_calibrate);
|
|
|
- lapic_timer_frequency = fsb * 1000 / HZ;
|
|
|
- /* mark tsc clocksource as reliable */
|
|
|
- set_cpu_cap(&boot_cpu_data, X86_FEATURE_TSC_RELIABLE);
|
|
|
-
|
|
|
- if (fast_calibrate)
|
|
|
- return fast_calibrate;
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
static void __init intel_mid_time_init(void)
|
|
|
{
|
|
|
sfi_table_parse(SFI_SIG_MTMR, NULL, NULL, sfi_parse_mtmr);
|