From patchwork Fri Mar 27 16:32:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 6109441 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A7CBCBF90F for ; Fri, 27 Mar 2015 16:33:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C392E20421 for ; Fri, 27 Mar 2015 16:33:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B4C66203AD for ; Fri, 27 Mar 2015 16:33:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753330AbbC0QdF (ORCPT ); Fri, 27 Mar 2015 12:33:05 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:13267 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752778AbbC0QdD (ORCPT ); Fri, 27 Mar 2015 12:33:03 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NLV00LCYPZ1MF30@mailout3.samsung.com>; Sat, 28 Mar 2015 01:33:01 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-c5-5515863d4fbc Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id DE.ED.20081.D3685155; Sat, 28 Mar 2015 01:33:01 +0900 (KST) Received: from amdc1032.localnet ([106.116.147.136]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NLV00IZ5PZ03V10@mmp1.samsung.com>; Sat, 28 Mar 2015 01:33:01 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Viresh Kumar Cc: "Rafael J. Wysocki" , Sachin Kamat , Lukasz Majewski , Kukjin Kim , linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: exynos: remove dead ->need_apll_change method Date: Fri, 27 Mar 2015 17:32:53 +0100 Message-id: <2557080.JPtuM0lETZ@amdc1032> User-Agent: KMail/4.8.4 (Linux/3.2.0-70-generic-pae; KDE/4.8.5; i686; ; ) MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t9jAV3bNtFQgw3TNC36H79mtnjzcDOj xabH11gtLu+aw2bxufcIo8WM8/uYLM6cvsRqcfJPL6PFxq8eDpwem1Z1snncubaHzWPzknqP LVfbWTz6tqxi9Pi8SS6ALYrLJiU1J7MstUjfLoErY9PURqaCDumK9d/nMDUwLhHrYuTgkBAw kVh6rqyLkRPIFJO4cG89WxcjF4eQwCJGife3P7BAON8YJbo+X2UFqWITsJKY2L6KEaRZREBL 4uXNVJAaZoGlTBLfb/9kAakRFnCXeLboGRuIzSKgKnF810J2EJtXQFNi78+1jCC2qICnxM7p Bxgh4oISPybfA+tlFpCX2Ld/KiuErSWxfudxpgmMfLOQlM1CUjYLSdkCRuZVjKKpBckFxUnp uYZ6xYm5xaV56XrJ+bmbGMHh/ExqB+PKBotDjAIcjEo8vD92i4QKsSaWFVfmHmKU4GBWEuGd 3CgaKsSbklhZlVqUH19UmpNafIhRmoNFSZxXyb4tREggPbEkNTs1tSC1CCbLxMEp1cDIcGBb 7LcbcuEGMxm3xAYFfnO4cvoa5yE1k945gg9s//TKB4ctOs69yf9NyRJTHTmXeSZVitH7167K YbxWmXRMIymP5TXzOe2HvBcXqn0VvBTiY6c9j0E0uHXvt6CKM3vnHtRcL2n19w3Tkj3vX25L kQ+dvjMuuayN+dAt73+O+zSLkx7o/ZihxFKckWioxVxUnAgA9Vv/6mMCAAA= Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 26ab1c62b6e1 ("cpufreq: exynos5250: Set APLL rate using CCF API") removed the last user of ->need_apll_change method. Remove it and then cleanup exynos_cpufreq_scale() accordingly. This patch was tested on Exynos4412 SoC based Trats2 board. There should be no functional changes caused by this patch. Cc: Sachin Kamat Cc: Lukasz Majewski Cc: Kukjin Kim Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Viresh Kumar --- drivers/cpufreq/exynos-cpufreq.c | 30 +++--------------------------- drivers/cpufreq/exynos-cpufreq.h | 1 - 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 82d2fbb..01ed166 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -45,11 +45,9 @@ static int exynos_cpufreq_get_index(unsigned int freq) static int exynos_cpufreq_scale(unsigned int target_freq) { - struct cpufreq_frequency_table *freq_table = exynos_info->freq_table; unsigned int *volt_table = exynos_info->volt_table; struct cpufreq_policy *policy = cpufreq_cpu_get(0); - unsigned int arm_volt, safe_arm_volt = 0; - unsigned int mpll_freq_khz = exynos_info->mpll_freq_khz; + unsigned int arm_volt; struct device *dev = exynos_info->dev; unsigned int old_freq; int index, old_index; @@ -74,21 +72,10 @@ static int exynos_cpufreq_scale(unsigned int target_freq) goto out; } - /* - * ARM clock source will be changed APLL to MPLL temporary - * To support this level, need to control regulator for - * required voltage level - */ - if (exynos_info->need_apll_change != NULL) { - if (exynos_info->need_apll_change(old_index, index) && - (freq_table[index].frequency < mpll_freq_khz) && - (freq_table[old_index].frequency < mpll_freq_khz)) - safe_arm_volt = volt_table[exynos_info->pll_safe_idx]; - } arm_volt = volt_table[index]; /* When the new frequency is higher than current frequency */ - if ((target_freq > old_freq) && !safe_arm_volt) { + if (target_freq > old_freq) { /* Firstly, voltage up to increase frequency */ ret = regulator_set_voltage(arm_regulator, arm_volt, arm_volt); if (ret) { @@ -98,21 +85,10 @@ static int exynos_cpufreq_scale(unsigned int target_freq) } } - if (safe_arm_volt) { - ret = regulator_set_voltage(arm_regulator, safe_arm_volt, - safe_arm_volt); - if (ret) { - dev_err(dev, "failed to set cpu voltage to %d\n", - safe_arm_volt); - return ret; - } - } - exynos_info->set_freq(old_index, index); /* When the new frequency is lower than current frequency */ - if ((target_freq < old_freq) || - ((target_freq > old_freq) && safe_arm_volt)) { + if (target_freq < old_freq) { /* down the voltage after frequency change */ ret = regulator_set_voltage(arm_regulator, arm_volt, arm_volt); diff --git a/drivers/cpufreq/exynos-cpufreq.h b/drivers/cpufreq/exynos-cpufreq.h index 9f2062a..fe5a105 100644 --- a/drivers/cpufreq/exynos-cpufreq.h +++ b/drivers/cpufreq/exynos-cpufreq.h @@ -49,7 +49,6 @@ struct exynos_dvfs_info { unsigned int *volt_table; struct cpufreq_frequency_table *freq_table; void (*set_freq)(unsigned int, unsigned int); - bool (*need_apll_change)(unsigned int, unsigned int); void __iomem *cmu_regs; };