msm: acpuclock-8960: Replace socinfo use with cpu_is_krait_v1()
Some of the code in the hotplug path is really specific to
the Krait v1 processor, not a specific SoC version. Replace
these checks with one that is more precise.
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/acpuclock-8960.c b/arch/arm/mach-msm/acpuclock-8960.c
index a213fe6..edac8bb 100644
--- a/arch/arm/mach-msm/acpuclock-8960.c
+++ b/arch/arm/mach-msm/acpuclock-8960.c
@@ -999,19 +999,15 @@
static int prev_pri_src[NR_CPUS];
static int prev_sec_src[NR_CPUS];
int cpu = (int)hcpu;
- uint32_t soc_platform_version = socinfo_get_platform_version();
switch (action) {
case CPU_DYING:
case CPU_DYING_FROZEN:
/*
- * 8960 HW versions < 2.1 must set their primary and secondary
- * mux source selections to QSB before L2 power collapse and
- * restore it after.
+ * On Krait v1, the primary and secondary muxes must be set
+ * to QSB before L2 power collapse and restored after.
*/
- if (SOCINFO_VERSION_MAJOR(soc_platform_version) < 2 ||
- (SOCINFO_VERSION_MAJOR(soc_platform_version) == 2 &&
- SOCINFO_VERSION_MINOR(soc_platform_version) < 1)) {
+ if (cpu_is_krait_v1()) {
prev_sec_src[cpu] = get_sec_clk_src(&scalable[cpu]);
prev_pri_src[cpu] = get_pri_clk_src(&scalable[cpu]);
set_sec_clk_src(&scalable[cpu], SEC_SRC_SEL_QSB);
@@ -1034,9 +1030,7 @@
break;
case CPU_STARTING:
case CPU_STARTING_FROZEN:
- if (SOCINFO_VERSION_MAJOR(soc_platform_version) < 2 ||
- (SOCINFO_VERSION_MAJOR(soc_platform_version) == 2 &&
- SOCINFO_VERSION_MINOR(soc_platform_version) < 1)) {
+ if (cpu_is_krait_v1()) {
set_sec_clk_src(&scalable[cpu], prev_sec_src[cpu]);
set_pri_clk_src(&scalable[cpu], prev_pri_src[cpu]);
}