diff options
Diffstat (limited to 'arch/x86/platform/intel-mid/intel-mid.c')
-rw-r--r-- | arch/x86/platform/intel-mid/intel-mid.c | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/arch/x86/platform/intel-mid/intel-mid.c b/arch/x86/platform/intel-mid/intel-mid.c index 527d6d50643d..40955841bb32 100644 --- a/arch/x86/platform/intel-mid/intel-mid.c +++ b/arch/x86/platform/intel-mid/intel-mid.c | |||
@@ -60,14 +60,27 @@ | |||
60 | 60 | ||
61 | enum intel_mid_timer_options intel_mid_timer_options; | 61 | enum intel_mid_timer_options intel_mid_timer_options; |
62 | 62 | ||
63 | /* intel_mid_ops to store sub arch ops */ | ||
64 | struct intel_mid_ops *intel_mid_ops; | ||
65 | /* getter function for sub arch ops*/ | ||
66 | static void *(*get_intel_mid_ops[])(void) = INTEL_MID_OPS_INIT; | ||
63 | enum intel_mid_cpu_type __intel_mid_cpu_chip; | 67 | enum intel_mid_cpu_type __intel_mid_cpu_chip; |
64 | EXPORT_SYMBOL_GPL(__intel_mid_cpu_chip); | 68 | EXPORT_SYMBOL_GPL(__intel_mid_cpu_chip); |
65 | 69 | ||
70 | static void intel_mid_power_off(void) | ||
71 | { | ||
72 | }; | ||
73 | |||
66 | static void intel_mid_reboot(void) | 74 | static void intel_mid_reboot(void) |
67 | { | 75 | { |
68 | intel_scu_ipc_simple_command(IPCMSG_COLD_BOOT, 0); | 76 | intel_scu_ipc_simple_command(IPCMSG_COLD_BOOT, 0); |
69 | } | 77 | } |
70 | 78 | ||
79 | static unsigned long __init intel_mid_calibrate_tsc(void) | ||
80 | { | ||
81 | return 0; | ||
82 | } | ||
83 | |||
71 | static void __init intel_mid_time_init(void) | 84 | static void __init intel_mid_time_init(void) |
72 | { | 85 | { |
73 | sfi_table_parse(SFI_SIG_MTMR, NULL, NULL, sfi_parse_mtmr); | 86 | sfi_table_parse(SFI_SIG_MTMR, NULL, NULL, sfi_parse_mtmr); |
@@ -92,13 +105,33 @@ static void __init intel_mid_time_init(void) | |||
92 | 105 | ||
93 | static void intel_mid_arch_setup(void) | 106 | static void intel_mid_arch_setup(void) |
94 | { | 107 | { |
95 | if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 0x27) | 108 | if (boot_cpu_data.x86 != 6) { |
96 | __intel_mid_cpu_chip = INTEL_MID_CPU_CHIP_PENWELL; | ||
97 | else { | ||
98 | pr_err("Unknown Intel MID CPU (%d:%d), default to Penwell\n", | 109 | pr_err("Unknown Intel MID CPU (%d:%d), default to Penwell\n", |
99 | boot_cpu_data.x86, boot_cpu_data.x86_model); | 110 | boot_cpu_data.x86, boot_cpu_data.x86_model); |
100 | __intel_mid_cpu_chip = INTEL_MID_CPU_CHIP_PENWELL; | 111 | __intel_mid_cpu_chip = INTEL_MID_CPU_CHIP_PENWELL; |
112 | goto out; | ||
113 | } | ||
114 | |||
115 | switch (boot_cpu_data.x86_model) { | ||
116 | case 0x35: | ||
117 | __intel_mid_cpu_chip = INTEL_MID_CPU_CHIP_CLOVERVIEW; | ||
118 | break; | ||
119 | case 0x27: | ||
120 | default: | ||
121 | __intel_mid_cpu_chip = INTEL_MID_CPU_CHIP_PENWELL; | ||
122 | break; | ||
101 | } | 123 | } |
124 | |||
125 | if (__intel_mid_cpu_chip < MAX_CPU_OPS(get_intel_mid_ops)) | ||
126 | intel_mid_ops = get_intel_mid_ops[__intel_mid_cpu_chip](); | ||
127 | else { | ||
128 | intel_mid_ops = get_intel_mid_ops[INTEL_MID_CPU_CHIP_PENWELL](); | ||
129 | pr_info("ARCH: Uknown SoC, assuming PENWELL!\n"); | ||
130 | } | ||
131 | |||
132 | out: | ||
133 | if (intel_mid_ops->arch_setup) | ||
134 | intel_mid_ops->arch_setup(); | ||
102 | } | 135 | } |
103 | 136 | ||
104 | /* MID systems don't have i8042 controller */ | 137 | /* MID systems don't have i8042 controller */ |