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: 7113141 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 1EEE3BEEC1 for ; Wed, 2 Sep 2015 16:43:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E49E20647 for ; Wed, 2 Sep 2015 16:43:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B88320629 for ; Wed, 2 Sep 2015 16:43:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755389AbbIBQnO (ORCPT ); Wed, 2 Sep 2015 12:43:14 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:49497 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754666AbbIBQnM (ORCPT ); Wed, 2 Sep 2015 12:43:12 -0400 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>; 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 Cc: Sylwester Nawrocki , Michael Turquette , Tomasz Figa , Lukasz Majewski , Heiko Stuebner , Chanwoo Choi , Kevin Hilman , Javier Martinez Canillas , Tobias Jakobi , Anand Moon , linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com 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== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 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)