From patchwork Fri Aug 16 02:25:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19176 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3FA592486D for ; Fri, 16 Aug 2013 02:26:15 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf1699228vbg.4 for ; Thu, 15 Aug 2013 19:26:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state: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=e9cfOudqpvFTyoYqt05shIBpdu1/1gycdxgqYM9qxik=; b=Rtg9CAr3FFPeRyi9RzqY/hF2OJCrXysojaiQByLRPCMj1CKFtrLVc5+x7fvevAa8yE zXJ1UWI3XAHOIaGy8ZrERu/6fwPgywH9Xodbv+GxpOry+XY9CPqRfj0yFkCIRVa2qga7 NDTTTYygP5tSHLk0DhjL3RzZ/eyRD4ccoXrPDE72rPHJScZfJpe+nplLlP2e1ai+9BOp TsOWl6PW3u1Oid9SdnAs01G3QBkY9FjfnAKyUu3+rhyl7xyxhlK1Y36IO9aiZCZiSxLk fcZPCE9rDTHMvszU9IXkUy1K4c8o9EwZpmZ8DhhBL4SflpAZtEAwtbyuZRPoJplrVYlE BUgQ== X-Received: by 10.236.185.230 with SMTP id u66mr343594yhm.42.1376619974881; Thu, 15 Aug 2013 19:26:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.10 with SMTP id d10ls628544qej.19.gmail; Thu, 15 Aug 2013 19:26:14 -0700 (PDT) X-Received: by 10.52.35.145 with SMTP id h17mr14556014vdj.24.1376619974738; Thu, 15 Aug 2013 19:26:14 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id gq10si770445vdc.4.2013.08.15.19.26.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:26:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 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.48; Received: by mail-vb0-f48.google.com with SMTP id w16so1220602vbf.35 for ; Thu, 15 Aug 2013 19:26:14 -0700 (PDT) X-Gm-Message-State: ALoCoQm49+00i3cU02qJHYjotkZzYDx5VxudomkRU8tJD4CLuoHA//ARagss6VbwmKpa8CqZ9MQu X-Received: by 10.52.244.78 with SMTP id xe14mr2833578vdc.30.1376619974642; Thu, 15 Aug 2013 19:26:14 -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 u4csp45133vcz; Thu, 15 Aug 2013 19:26:14 -0700 (PDT) X-Received: by 10.68.216.227 with SMTP id ot3mr18729818pbc.80.1376619973881; Thu, 15 Aug 2013 19:26:13 -0700 (PDT) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by mx.google.com with ESMTPS id dw1si1856026pbc.36.2013.08.15.19.26.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:26:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.182 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.182; Received: by mail-pd0-f182.google.com with SMTP id r10so570894pdi.27 for ; Thu, 15 Aug 2013 19:26:13 -0700 (PDT) X-Received: by 10.68.237.3 with SMTP id uy3mr11123164pbc.155.1376619973480; Thu, 15 Aug 2013 19:26:13 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id xl3sm2681256pbb.17.2013.08.15.19.26.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:26:12 -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 03/34] cpufreq: arm_big_little: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:00 +0530 Message-Id: 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.48 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 daf4423..e3e8f25 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)