From patchwork Tue Apr 29 05:24:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jhbird.choi@samsung.com X-Patchwork-Id: 4084841 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E3C749F38E for ; Tue, 29 Apr 2014 05:27:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B8B4201C0 for ; Tue, 29 Apr 2014 05:27:36 +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 4D23F20149 for ; Tue, 29 Apr 2014 05:27:35 +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 1Wf0Ww-0005Na-DY; Tue, 29 Apr 2014 05:24:34 +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 1Wf0Wt-0005Mp-Lw for linux-arm-kernel@lists.infradead.org; Tue, 29 Apr 2014 05:24:32 +0000 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4S00BG81O5TC00@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 29 Apr 2014 14:24:05 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 0A.32.11496.5773F535; Tue, 29 Apr 2014 14:24:05 +0900 (KST) X-AuditID: cbfee691-b7f3e6d000002ce8-e5-535f3775fe7d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 24.2B.27725.5773F535; Tue, 29 Apr 2014 14:24:05 +0900 (KST) Received: from DOJHBIRDCHO03 ([12.36.166.127]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4S00A6P1O3KL50@mmp2.samsung.com>; Tue, 29 Apr 2014 14:24:05 +0900 (KST) From: Jonghwan Choi To: "'open list:CPU FREQUENCY DRI...'" , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/2] cpufreq: Remove exynos_sort_descend_freq_table in exynos5440-cpufreq.c Date: Tue, 29 Apr 2014 14:24:05 +0900 Message-id: <000701cf636b$3d1d13c0$b7573b40$@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac9jasDqVzbdIMr/TaWIn5ShOI71dA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMIsWRmVeSWpSXmKPExsVy+t8zI91S8/hgg39fTSyeNv1gt+hdcJXN YtPja6wWM87vY7I4c/oSq8XGrx4ObB53ru1h89i8pN5jy9V2Fo++LasYPT5vkgtgjeKySUnN ySxLLdK3S+DK2HvetGALX8WcLceZGxhbeLoYOTgkBEwkuu/ZdTFyApliEhfurWfrYuTiEBJY xihxfu0KdoiEicS8g3tZIRLTGSVe3nvJBOH8Y5S43H+WDaSKTUBX4tj6LWBVIgLdjBKT1y5h AUkwC9RLnO7cxApiCwvESmyZsZ4ZxGYRUJVYsHcLWJxXwFJi5bSnLBC2oMSPyfegerUk1u88 zgRhy0tsXvOWGeIkBYkdZ18zgtgiAnoSZ99PYIeoEZHY9+IdI8gREgLH2CXur7zABLFMQOLb 5EMsED/LSmw6ADVHUuLgihssExjFZiFZPQv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e89pK9+Fq2PoTl+77F Nvwqe2bNO72X/1HBkj2HJ0jrK65UXCuyxcZoZ2DDrI1br85dIPO9lMNAtDs3tb/U++79y/Gc pfs0/qUsyEmv28lzfFpHZ7bnerWYR9nOl+V4v+Str/qv2xU84YjXskcipcUV8ct+z9rAbKSq v+fPqUVaG/drrS49qcRSnJFoqMVcVJwIAEagw/M0AwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140428_222431_902960_169C16AD X-CRM114-Status: GOOD ( 10.05 ) X-Spam-Score: -5.6 (-----) Cc: 'Viresh Kumar' , 'Kukjin Kim' , "'Rafael J. Wysocki'" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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=-2.5 required=5.0 tests=BAYES_00,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 After applying "PM / OPP: Use list_for_each_entry_reverse instead of list_for_each_entry", cpufreq table is sorted int descending order. So exynos_sort_descend_freq_table doesn't need anymore. Signed-off-by: Jonghwan Choi --- drivers/cpufreq/exynos5440-cpufreq.c | 20 -------------------- 1 file changed, 20 deletions(-) static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) { policy->clk = dvfs_info->cpu_clk; @@ -374,7 +355,6 @@ static int exynos_cpufreq_probe(struct platform_device *pdev) goto err_put_node; } dvfs_info->freq_count = dev_pm_opp_get_opp_count(dvfs_info->dev); - exynos_sort_descend_freq_table(); if (of_property_read_u32(np, "clock-latency", &dvfs_info->latency)) dvfs_info->latency = DEF_TRANS_LATENCY; diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c index a6b8214..92db80b 100644 --- a/drivers/cpufreq/exynos5440-cpufreq.c +++ b/drivers/cpufreq/exynos5440-cpufreq.c @@ -279,25 +279,6 @@ static irqreturn_t exynos_cpufreq_irq(int irq, void *id) return IRQ_HANDLED; } -static void exynos_sort_descend_freq_table(void) -{ - struct cpufreq_frequency_table *freq_tbl = dvfs_info->freq_table; - int i = 0, index; - unsigned int tmp_freq; - /* - * Exynos5440 clock controller state logic expects the cpufreq table to - * be in descending order. But the OPP library constructs the table in - * ascending order. So to make the table descending we just need to - * swap the i element with the N - i element. - */ - for (i = 0; i < dvfs_info->freq_count / 2; i++) { - index = dvfs_info->freq_count - i - 1; - tmp_freq = freq_tbl[i].frequency; - freq_tbl[i].frequency = freq_tbl[index].frequency; - freq_tbl[index].frequency = tmp_freq; - } -} -