From patchwork Wed Sep 2 16:42:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 7113161 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 9D1749F372 for ; Wed, 2 Sep 2015 16:45:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C467120647 for ; Wed, 2 Sep 2015 16:45:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DBDB120634 for ; Wed, 2 Sep 2015 16:45:11 +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 1ZXB8K-0004v1-M2; Wed, 02 Sep 2015 16:43:36 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZXB8H-0004iE-LB for linux-arm-kernel@lists.infradead.org; Wed, 02 Sep 2015 16:43:34 +0000 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NU202AQG6FXGR40@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 03 Sep 2015 01:43:09 +0900 (KST) X-AuditID: cbfee61a-f79a06d000005c6f-79-55e7271d2abf Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 77.1B.23663.D1727E55; Thu, 3 Sep 2015 01:43:09 +0900 (KST) Received: from AMDC1976.DIGITAL.local ([106.120.53.102]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NU2006JH6FIUR70@mmp1.samsung.com>; Thu, 03 Sep 2015 01:43:09 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Thomas Abraham , Kukjin Kim , Kukjin Kim , Viresh Kumar , Krzysztof Kozlowski , Marek Szyprowski Subject: [PATCH] cpufreq-dt: add suspend frequency support Date: Wed, 02 Sep 2015 18:42:01 +0200 Message-id: <1441212121-21021-1-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsVy+t9jAV1Z9eehBn+fqVlsnLGe1eL6l+es Fv8fvWa1ePN2DZPF6xeGFr0LrrJZ9D9+zWzx9fAKRos3DzczWmx6fI3V4mPPPVaLy7vmsFl8 7j3CaDHj/D4mi3Ubb7FbrD1yl93i4ilXi8Nv2lktOpYxWrSt/sBqsWrXH0aLjV89HMQ83t9o ZffYOesuu8emVZ1sHneu7WHz2Lyk3uPfMXaPLf1A4b4tqxg9tl+bx+zxeZNcAFcUl01Kak5m WWqRvl0CV8aVLdOYCmbzVty7/ZS5gXEqdxcjJ4eEgIlEW9NlNghbTOLCvfVgtpDAUkaJpc8d uxg5gOxfjBLvrUDCbAJWEhPbVzF2MXJxiAh8Z5T4On0XG4jDLPCMRaL1XTcrSJUwUNWijetZ QGwWAVWJyW8amUBsXgEPiTP3XjJCLJOTOHlsMusERu4FjAyrGCVSC5ILipPScw3zUsv1ihNz i0vz0vWS83M3MYLD/JnUDsaDu9wPMQpwMCrx8DYkPgsVYk0sK67MPcQowcGsJMIb9A8oxJuS WFmVWpQfX1Sak1p8iFGag0VJnFd2JVBKID2xJDU7NbUgtQgmy8TBKdXAGBjjJrnnR4C2l5yM YMoTQ1Ofd7cCtOaLvDyYk7xnrX5pc/Oy9trTpuY2n14sOca/5+l8vu6Hb6KnGh40lOyY71OR dvG6u3Kggmv4um9Hg13MRRnW26UVqtdvzfC7kDU1w1Xs7W3rIKmPu+tbPZJlXwlGxnGpH46M XrS3z9KdK2UBMydzn4ISS3FGoqEWc1FxIgB0CcpsbwIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150902_094333_846102_C134F940 X-CRM114-Status: GOOD ( 14.55 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lukasz Majewski , Kevin Hilman , Heiko Stuebner , Javier Martinez Canillas , Anand Moon , Michael Turquette , linux-pm@vger.kernel.org, Tomasz Figa , linux-kernel@vger.kernel.org, Chanwoo Choi , b.zolnierkie@samsung.com, Tobias Jakobi , linux-arm-kernel@lists.infradead.org, Sylwester Nawrocki , linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org MIME-Version: 1.0 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 Add suspend frequency support and set it to the boot frequency, this matches what the old exynos-cpufreq driver has been doing. This patch fixes suspend/resume support on Exynos4412 based Trats2 board and reboot hang on Exynos4412 based Odroid U3 board. Cc: Viresh Kumar Cc: Thomas Abraham Cc: Javier Martinez Canillas Cc: Krzysztof Kozlowski Cc: Marek Szyprowski Cc: Tobias Jakobi Signed-off-by: Bartlomiej Zolnierkiewicz --- This patch supersedes "[PATCH] ARM: dts: exynos4412-odroid-*: add workaround for CPUfreq/reboot issue" one from yesterday. drivers/cpufreq/cpufreq-dt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index c3583cd..c9138c7 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -329,6 +329,10 @@ static int cpufreq_init(struct cpufreq_policy *policy) policy->driver_data = priv; policy->clk = cpu_clk; + + /* capture boot frequency */ + policy->suspend_freq = clk_get_rate(cpu_clk) / 1000;; + ret = cpufreq_table_validate_and_show(policy, freq_table); if (ret) { dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__, @@ -419,6 +423,9 @@ static struct cpufreq_driver dt_cpufreq_driver = { .ready = cpufreq_ready, .name = "cpufreq-dt", .attr = cpufreq_dt_attr, +#ifdef CONFIG_PM + .suspend = cpufreq_generic_suspend, +#endif }; static int dt_cpufreq_probe(struct platform_device *pdev)