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: 6109451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5F0619F350 for ; Fri, 27 Mar 2015 16:36:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6F2AB203AD for ; Fri, 27 Mar 2015 16:36:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EE8E20034 for ; Fri, 27 Mar 2015 16:36:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YbXCN-0001Qi-Vz; Fri, 27 Mar 2015 16:33:32 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YbXCG-0001HP-8y for linux-arm-kernel@lists.infradead.org; Fri, 27 Mar 2015 16:33:25 +0000 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> for linux-arm-kernel@lists.infradead.org; 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 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 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= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150327_093324_481108_99575722 X-CRM114-Status: GOOD ( 14.75 ) X-Spam-Score: -5.0 (-----) Cc: Lukasz Majewski , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, Sachin Kamat , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Kukjin Kim , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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; };