From patchwork Wed Sep 2 16:47:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 7113171 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 8C40EBEEC1 for ; Wed, 2 Sep 2015 16:48:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99E6B20650 for ; Wed, 2 Sep 2015 16:48:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7D2620651 for ; Wed, 2 Sep 2015 16:48:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755130AbbIBQse (ORCPT ); Wed, 2 Sep 2015 12:48:34 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:49394 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754424AbbIBQsd (ORCPT ); Wed, 2 Sep 2015 12:48:33 -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 <0NU201ULY6OV4T70@mailout1.samsung.com>; Thu, 03 Sep 2015 01:48:31 +0900 (KST) X-AuditID: cbfee61a-f79a06d000005c6f-7c-55e7285f1822 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id BE.5B.23663.F5827E55; Thu, 3 Sep 2015 01:48:31 +0900 (KST) Received: from AMDC1976.DIGITAL.local ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NU2007926OIAV40@mmp2.samsung.com>; Thu, 03 Sep 2015 01:48:30 +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 v2] cpufreq-dt: add suspend frequency support Date: Wed, 02 Sep 2015 18:47:56 +0200 Message-id: <1441212476-21316-1-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHLMWRmVeSWpSXmKPExsVy+t9jQd14jeehBn/fKlhsnLGe1eL6l+es Fv8fvWa1ePN2DZPF6xeGFr0LrrJZ9D9+zWzx9fAKRos3DzczWmx6fI3V4mPPPVaLy7vmsFl8 7j3CaDHj/D4mi3Ubb7FbrD1yl93i4ilXi8Nv2lktOpYxWrSt/sBqsWrXH0aLjV89HMQ83t9o ZffYOesuu8emVZ1sHneu7WHz2Lyk3uPfMXaPLf1A4b4tqxg9tl+bx+zxeZNcAFcUl01Kak5m WWqRvl0CV8bM7yvZCnbzVvx6+I21gXENdxcjB4eEgInE1xViXYycQKaYxIV769m6GLk4hARm MUo8OLSAHcL5xShxdec9VpAqNgEriYntqxhBEiIC3xklvk7fBdbCLPCMRaL1XTdYlbCArcS7 O8sZQWwWAVWJrXveMYPYvAIeEu8Wn2CE2CcncfLYZNYJjNwLGBlWMUqkFiQXFCel5xrmpZbr FSfmFpfmpesl5+duYgSH+jOpHYwHd7kfYhTgYFTi4W1IfBYqxJpYVlyZe4hRgoNZSYQ36B9Q iDclsbIqtSg/vqg0J7X4EKM0B4uSOK/sSqCUQHpiSWp2ampBahFMlomDU6qB8fSa4ENzY89s EpWpX+22vnneMpXLh8RsZj9h6bmrZ1zGdkP68bGZ6oq3bk/ieJdktmrLs31GEy2jGe4uO5z1 5s1a7T37GsrMtx3dUq6b2rLSnv0Gi6/Xmugd7ZeKnFYe8FKb8vKFqD/X/TWfPxgY3zxz7cov jfhEcx2/5lP1EeVpXskPojYZTlViKc5INNRiLipOBADbQ8ZHcQIAAA== 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. v2: - remove superfluous ";" 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)