summaryrefslogtreecommitdiff
path: root/arch/x86/platform/intel-mid/mfld.c
diff options
context:
space:
mode:
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>2013-12-16 12:07:37 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2014-01-15 14:38:58 -0800
commit85611e3febe78955a519f5f9eb47b941525c8c76 (patch)
tree86195f07a8e4afd24501a93c11b64c7122265d01 /arch/x86/platform/intel-mid/mfld.c
parentecd6910db979bc40ac19f0e71e027132fc906068 (diff)
downloadlinux-85611e3febe78955a519f5f9eb47b941525c8c76.tar.gz
linux-85611e3febe78955a519f5f9eb47b941525c8c76.tar.bz2
linux-85611e3febe78955a519f5f9eb47b941525c8c76.zip
x86, intel-mid: Add Clovertrail platform support
This patch adds Clovertrail support on intel-mid and makes it more flexible to support other SoCs. Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Link: http://lkml.kernel.org/r/1387224459-25746-3-git-send-email-david.a.cohen@linux.intel.com Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: Fei Yang <fei.yang@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/platform/intel-mid/mfld.c')
-rw-r--r--arch/x86/platform/intel-mid/mfld.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/arch/x86/platform/intel-mid/mfld.c b/arch/x86/platform/intel-mid/mfld.c
index c7ff83c4576d..4f7884eebc14 100644
--- a/arch/x86/platform/intel-mid/mfld.c
+++ b/arch/x86/platform/intel-mid/mfld.c
@@ -15,11 +15,19 @@
#include <asm/intel-mid.h>
#include <asm/intel_mid_vrtc.h>
-void intel_mid_power_off(void)
+#include "intel_mid_weak_decls.h"
+
+static void penwell_arch_setup(void);
+/* penwell arch ops */
+static struct intel_mid_ops penwell_ops = {
+ .arch_setup = penwell_arch_setup,
+};
+
+static void mfld_power_off(void)
{
}
-unsigned long __init intel_mid_calibrate_tsc(void)
+static unsigned long __init mfld_calibrate_tsc(void)
{
unsigned long fast_calibrate;
u32 lo, hi, ratio, fsb;
@@ -35,9 +43,9 @@ unsigned long __init intel_mid_calibrate_tsc(void)
}
rdmsr(MSR_FSB_FREQ, lo, hi);
if ((lo & 0x7) == 0x7)
- fsb = PENWELL_FSB_FREQ_83SKU;
+ fsb = FSB_FREQ_83SKU;
else
- fsb = PENWELL_FSB_FREQ_100SKU;
+ fsb = FSB_FREQ_100SKU;
fast_calibrate = ratio * fsb;
pr_debug("read penwell tsc %lu khz\n", fast_calibrate);
lapic_timer_frequency = fsb * 1000 / HZ;
@@ -49,3 +57,19 @@ unsigned long __init intel_mid_calibrate_tsc(void)
return 0;
}
+
+static void __init penwell_arch_setup()
+{
+ x86_platform.calibrate_tsc = mfld_calibrate_tsc;
+ pm_power_off = mfld_power_off;
+}
+
+void * __cpuinit get_penwell_ops()
+{
+ return &penwell_ops;
+}
+
+void * __cpuinit get_cloverview_ops()
+{
+ return &penwell_ops;
+}