summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/qcom-cpufreq.c
diff options
context:
space:
mode:
authorSantosh Mardi <gsantosh@codeaurora.org>2017-01-12 16:48:53 +0530
committerSantosh Mardi <gsantosh@codeaurora.org>2017-01-13 16:03:39 +0530
commitda2e9dd3fa9c16a85fdc8296ab8d9730ea291256 (patch)
tree56fd203840a2ee5bad5e94af6f4b2bb670f4a160 /drivers/cpufreq/qcom-cpufreq.c
parent2dc96b1cbbdcf5aef3780696708012d55fec57f2 (diff)
cpufreq: changes to adapt for opensource clock framework
Update cpufreq driver to adapt to opensource clock framework Opensource clock framework dev_clk_get returns with the different clock handle for all cpu cores with same clock source This is different in the existing clock framework where dev_clk_get returns with the same clock handle for the cores which shares the same clock source. Cpufreq driver was compatible with the existing clock framework but with the opensource clock framework we need to handle the different clock handles for all the cores even the clock source is common. Change-Id: Ic343bc20dc7c8b2ce151a5a2b5f85b43cdd949bf Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Diffstat (limited to 'drivers/cpufreq/qcom-cpufreq.c')
-rw-r--r--drivers/cpufreq/qcom-cpufreq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/cpufreq/qcom-cpufreq.c b/drivers/cpufreq/qcom-cpufreq.c
index 2aa7b783f276..cb7323886082 100644
--- a/drivers/cpufreq/qcom-cpufreq.c
+++ b/drivers/cpufreq/qcom-cpufreq.c
@@ -3,7 +3,7 @@
* MSM architecture cpufreq driver
*
* Copyright (C) 2007 Google, Inc.
- * Copyright (c) 2007-2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2007-2017, The Linux Foundation. All rights reserved.
* Author: Mike A. Chan <mikechan@google.com>
*
* This software is licensed under the terms of the GNU General Public
@@ -390,8 +390,10 @@ static int __init msm_cpufreq_probe(struct platform_device *pdev)
for_each_possible_cpu(cpu) {
snprintf(clk_name, sizeof(clk_name), "cpu%d_clk", cpu);
c = devm_clk_get(dev, clk_name);
- if (IS_ERR(c))
+ if (cpu == 0 && IS_ERR(c))
return PTR_ERR(c);
+ else if (IS_ERR(c))
+ c = cpu_clk[cpu-1];
cpu_clk[cpu] = c;
}
hotplug_ready = true;