From patchwork Tue Nov 26 14:36:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 21783 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6AB4B202DA for ; Tue, 26 Nov 2013 14:36:25 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id oz11sf13756335veb.8 for ; Tue, 26 Nov 2013 06:36:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:date:message-id :subject:from:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=P3hdySTpwAn5ePV6CzOPGYgzMI3ZnqfYmWDnJ2mi+dU=; b=S46ihU/p8wzFPaZEvNdz9QiXkVRzURjeONI/OVMsOYJUPumjn2s+GXv7K1LIKtm6D7 6irP0CAyu6TSmsGNTJB6Kq6L6XGb9ELMxygM3irSBqfV7qaBCKgxZOsIMh9EHjIf751N LOfWhV0R2TdxHmdNOojb03UfuXUTUssolQAQ2Yj1g6et9JNvlDLUVh4l2+5/Y2Nll4mR oKZ+oIa2vol4YU6/FR/tSfinY4HrJNNkJGGoslKaubSxCK6gmn9LzXrQw+BZ5+u4dgHN XYzbsyUazoaIvdXhHSm132NPn5avIS221PgVkDrQxL3ZtgnwFawh4Mf7PRQNMvtSMBKl J9ZQ== X-Gm-Message-State: ALoCoQlOg9YBGp5ke6F3yJ6wdDyMvjiOfIAsbI30n+mHUTIGmqg9SHpH4AC2ur/1OMlck9P46VlS X-Received: by 10.236.180.2 with SMTP id i2mr14451202yhm.4.1385476584572; Tue, 26 Nov 2013 06:36:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.86.232 with SMTP id s8ls578622qez.67.gmail; Tue, 26 Nov 2013 06:36:24 -0800 (PST) X-Received: by 10.220.145.75 with SMTP id c11mr2674033vcv.30.1385476584466; Tue, 26 Nov 2013 06:36:24 -0800 (PST) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id gs7si19610631veb.53.2013.11.26.06.36.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Nov 2013 06:36:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id p6so4047413vbe.27 for ; Tue, 26 Nov 2013 06:36:24 -0800 (PST) X-Received: by 10.52.169.227 with SMTP id ah3mr121288vdc.45.1385476584314; Tue, 26 Nov 2013 06:36:24 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp217126vcz; Tue, 26 Nov 2013 06:36:23 -0800 (PST) X-Received: by 10.60.51.196 with SMTP id m4mr29473544oeo.1.1385476583265; Tue, 26 Nov 2013 06:36:23 -0800 (PST) Received: from mail-oa0-f45.google.com (mail-oa0-f45.google.com [209.85.219.45]) by mx.google.com with ESMTPS id uq6si31252517obc.148.2013.11.26.06.36.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Nov 2013 06:36:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.219.45 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.219.45; Received: by mail-oa0-f45.google.com with SMTP id o6so6104968oag.32 for ; Tue, 26 Nov 2013 06:36:22 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.63.7 with SMTP id c7mr1627904oes.67.1385476582834; Tue, 26 Nov 2013 06:36:22 -0800 (PST) Received: by 10.182.28.168 with HTTP; Tue, 26 Nov 2013 06:36:22 -0800 (PST) Date: Tue, 26 Nov 2013 20:06:22 +0530 Message-ID: Subject: Re: [PATCH V3 4/6] cpufreq: exynos: Use cpufreq_generic_suspend() From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Lists linaro-kernel , Patch Tracking , "cpufreq@vger.kernel.org" , "linux-pm@vger.kernel.org" , Linux Kernel Mailing List , Nishanth Menon , Stephen Warren , Kgene Kim , linux-samsung-soc , linux-tegra@vger.kernel.org, jinchoi@broadcom.com, Lan Tianyu , Sebastian Capella , Jonghwan Choi , Viresh Kumar X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 25 November 2013 19:41, Viresh Kumar wrote: > Currently we have implemented PM notifiers to disable/enable ->target() routines > functionality during suspend/resume. > > Now we have support present in cpufreq core, lets use it. > > Signed-off-by: Viresh Kumar > --- > drivers/cpufreq/exynos-cpufreq.c | 97 +++------------------------------------- > 1 file changed, 6 insertions(+), 91 deletions(-) Jonghwan Choi reported an issue with this patch. He asked me to look at: 6e45eb And so following diff is updated for this patch in my repo.. Will get that fixed in V4: @@ -182,6 +182,9 @@ static int __init exynos_cpufreq_init(void) goto err_vdd_arm; } + /* Done here as we want to capture boot frequency */ + locking_frequency = clk_get_rate(exynos_info->cpu_clk) / 1000; + if (!cpufreq_register_driver(&exynos_driver)) return 0; diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 4b6e6a6..3f216da 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -22,8 +22,8 @@ #include "exynos-cpufreq.h" static struct exynos_dvfs_info *exynos_info; - static struct regulator *arm_regulator; +static unsigned int locking_frequency; static int exynos_cpufreq_get_index(unsigned int freq) { @@ -134,7 +134,7 @@ static int exynos_target(struct cpufreq_policy *policy, unsigned int index) static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) { policy->clk = exynos_info->cpu_clk; - policy->suspend_freq = clk_get_rate(exynos_info->cpu_clk) / 1000; + policy->suspend_freq = locking_frequency; return cpufreq_generic_init(policy, exynos_info->freq_table, 100000); }