From patchwork Fri Sep 13 13:02:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20237 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 550D320358 for ; Fri, 13 Sep 2013 13:24:49 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id gf11sf1210884vcb.6 for ; Fri, 13 Sep 2013 06:24:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=diIILZ0c7L5ZAL0tj2tFGi2+kBKelJxbrtgSXP3IvMo=; b=iCtfd+xnxx1Iqe7d3zNN4r8+GHLRnN5OHHD/7VmM3jzdPI52NMqUkx53VoAe88ywRh jXOztXpQum9tHUC6DVLb+9PzBH3+h2QTuWgsW7OfdHWi5CowO85KNzZtmAVO3YmtxdgG Ixi8bWgqGzjZRrFdIbED6VsMHzmyD3Zrf0XtAasX04uOvTa1eg1GUM1aycS+NKjJlYhh 3tYXd70BTWuFuHZCBdCOnseB1nvKJ+cYT2dbTjVTp30QEB91uX/GYEt5LCtnqzIQAunD C3jdGj4OOgVhdIOlmbKmgzcAr1fWmtIT9O6XoRZlwO87xf71AaDL8suTBJeprfOWcuwt mQJQ== X-Gm-Message-State: ALoCoQlUL2LEDN/f4ChTNxEQzPYlFVLc3AWdgcNHofdqWeawIMviB4KBZ5FlvSCSfa+KWo2PK/NM X-Received: by 10.236.32.74 with SMTP id n50mr5017522yha.13.1379078689110; Fri, 13 Sep 2013 06:24:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.18.199 with SMTP id y7ls1183945qed.78.gmail; Fri, 13 Sep 2013 06:24:48 -0700 (PDT) X-Received: by 10.220.186.202 with SMTP id ct10mr12210926vcb.14.1379078688895; Fri, 13 Sep 2013 06:24:48 -0700 (PDT) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id tj1si3104747vdc.118.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:24:48 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.41 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.41; Received: by mail-vb0-f41.google.com with SMTP id g17so934765vbg.28 for ; Fri, 13 Sep 2013 06:24:48 -0700 (PDT) X-Received: by 10.58.190.34 with SMTP id gn2mr90865vec.34.1379078688808; Fri, 13 Sep 2013 06:24:48 -0700 (PDT) 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 u4csp80581vcz; Fri, 13 Sep 2013 06:24:48 -0700 (PDT) X-Received: by 10.68.245.227 with SMTP id xr3mr2100248pbc.182.1379078687876; Fri, 13 Sep 2013 06:24:47 -0700 (PDT) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id tl4si11174046pac.311.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:24:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.52; Received: by mail-pa0-f52.google.com with SMTP id kq13so2507340pab.25 for ; Fri, 13 Sep 2013 06:24:47 -0700 (PDT) X-Received: by 10.68.108.3 with SMTP id hg3mr13343242pbb.91.1379078687487; Fri, 13 Sep 2013 06:24:47 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id sy10sm18085147pac.15.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:24:47 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 183/228] cpufreq: arm_big_little: remove calls to cpufreq_notify_transition() Date: Fri, 13 Sep 2013 18:32:09 +0530 Message-Id: <68221a3bb993b064dea65cdaed1ff42f905d4879.1379063063.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: 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.41 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: , Most of the drivers do following in their ->target_index() routines: struct cpufreq_freqs freqs; freqs.old = old freq... freqs.new = new freq... cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); /* Change rate here */ cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); This is replicated over all cpufreq drivers today and there doesn't exists a good enough reason why this shouldn't be moved to cpufreq core instead. Earlier patches have added support in cpufreq core to do cpufreq notification on frequency change, this one removes it from this driver. Some related minor cleanups are also done along with it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/arm_big_little.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index c3936ef..69cae42 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -51,30 +51,11 @@ static unsigned int bL_cpufreq_get(unsigned int cpu) static int bL_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) { - struct cpufreq_freqs freqs; - u32 cpu = policy->cpu, cur_cluster; - int ret = 0; + u32 cur_cluster; cur_cluster = cpu_to_cluster(policy->cpu); - - freqs.old = bL_cpufreq_get(policy->cpu); - freqs.new = freq_table[cur_cluster][index].frequency; - - pr_debug("%s: cpu: %d, cluster: %d, oldfreq: %d, target freq: %d, new freq: %d\n", - __func__, cpu, cur_cluster, freqs.old, freqs.new, - freqs.new); - - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - - ret = clk_set_rate(clk[cur_cluster], freqs.new * 1000); - if (ret) { - pr_err("clk_set_rate failed: %d\n", ret); - freqs.new = freqs.old; - } - - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - - return ret; + return clk_set_rate(clk[cur_cluster], + freq_table[cur_cluster][index].frequency * 1000); } static void put_cluster_clk_and_freq_table(struct device *cpu_dev)