From patchwork Fri Aug 16 02:25:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19180 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 062C12486D for ; Fri, 16 Aug 2013 02:26:44 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id ha11sf1789198vcb.4 for ; Thu, 15 Aug 2013 19:26:44 -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=LhvMrP4EpCqKDkv1u0PoACQAI8TIAxIoPbGwfDLrLuY=; b=laEV/jbP2JA349PFpMwUF1akXziMlpt0puY+UWFY5/Wbmx3oHvjdgx8PpOEj5kYwSc DfpYugEptrYPnpTAnR3Xx9T2pvnMWG2nIem9uNDcMPPZ3MDzAJOxx7W1agpJ701covyH WH0Aayjy2W0vLUnl0Om5IDDP71TQHYIyEEMK3LfivSQ0+m5eV/oi886w5TNkk+o5NqSV ZaJ97k8kg09LkttHSQP6dR8vpydnOuS5EyE3qio+MSNCcR0v1JlMzlromw1iHsxSRL5Q hRCHT9koC09vdH6LNT22ranjPnJBLyS9WD+h3pFoiT7yWKOUrc5oIzSMJ3/0KgtpEY5H 4DMg== X-Received: by 10.236.46.72 with SMTP id q48mr357211yhb.30.1376620004561; Thu, 15 Aug 2013 19:26:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.3.169 with SMTP id d9ls580495qed.61.gmail; Thu, 15 Aug 2013 19:26:44 -0700 (PDT) X-Received: by 10.52.233.33 with SMTP id tt1mr14778314vdc.2.1376620004425; Thu, 15 Aug 2013 19:26:44 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id aa5si759448vdc.52.2013.08.15.19.26.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:26:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id ij15so354427vcb.16 for ; Thu, 15 Aug 2013 19:26:44 -0700 (PDT) X-Gm-Message-State: ALoCoQlpGiKER4f7VVx4Tw/7EO7cnkLuLgViSWGljzrPfFA0R24MpvooSBzQnPvmiP87Cox6g7J8 X-Received: by 10.58.201.227 with SMTP id kd3mr17448032vec.14.1376620004316; Thu, 15 Aug 2013 19:26:44 -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 u4csp45150vcz; Thu, 15 Aug 2013 19:26:43 -0700 (PDT) X-Received: by 10.66.171.204 with SMTP id aw12mr686627pac.7.1376620003456; Thu, 15 Aug 2013 19:26:43 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by mx.google.com with ESMTPS id qn3si1643429pbc.272.2013.08.15.19.26.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:26:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.180 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.180; Received: by mail-pd0-f180.google.com with SMTP id y10so1581917pdj.39 for ; Thu, 15 Aug 2013 19:26:43 -0700 (PDT) X-Received: by 10.66.146.66 with SMTP id ta2mr697205pab.11.1376620003085; Thu, 15 Aug 2013 19:26:43 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id bb1sm2824446pbc.10.2013.08.15.19.26.38 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:26:42 -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 , Jesper Nilsson , Mikael Starvik , linux-cris-kernel@axis.com Subject: [PATCH 07/34] cpufreq: cris: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:04 +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.220.171 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. Cc: Jesper Nilsson Cc: Mikael Starvik Cc: linux-cris-kernel@axis.com Signed-off-by: Viresh Kumar Acked-by: Jesper Nilsson --- drivers/cpufreq/cris-artpec3-cpufreq.c | 8 -------- drivers/cpufreq/cris-etraxfs-cpufreq.c | 8 -------- 2 files changed, 16 deletions(-) diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c index dace19d..e31e1e5 100644 --- a/drivers/cpufreq/cris-artpec3-cpufreq.c +++ b/drivers/cpufreq/cris-artpec3-cpufreq.c @@ -29,15 +29,9 @@ static unsigned int cris_freq_get_cpu_frequency(unsigned int cpu) static int cris_freq_target(struct cpufreq_policy *policy, unsigned int state) { - struct cpufreq_freqs freqs; reg_clkgen_rw_clk_ctrl clk_ctrl; clk_ctrl = REG_RD(clkgen, regi_clkgen, rw_clk_ctrl); - freqs.old = cris_freq_get_cpu_frequency(policy->cpu); - freqs.new = cris_freq_table[state].frequency; - - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - local_irq_disable(); /* Even though we may be SMP they will share the same clock @@ -50,8 +44,6 @@ static int cris_freq_target(struct cpufreq_policy *policy, unsigned int state) local_irq_enable(); - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - return 0; } diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c index 4d40d9df..9d577d0 100644 --- a/drivers/cpufreq/cris-etraxfs-cpufreq.c +++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c @@ -29,15 +29,9 @@ static unsigned int cris_freq_get_cpu_frequency(unsigned int cpu) static int cris_freq_target(struct cpufreq_policy *policy, unsigned int state) { - struct cpufreq_freqs freqs; reg_config_rw_clk_ctrl clk_ctrl; clk_ctrl = REG_RD(config, regi_config, rw_clk_ctrl); - freqs.old = cris_freq_get_cpu_frequency(policy->cpu); - freqs.new = cris_freq_table[state].frequency; - - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - local_irq_disable(); /* Even though we may be SMP they will share the same clock @@ -50,8 +44,6 @@ static int cris_freq_target(struct cpufreq_policy *policy, unsigned int state) local_irq_enable(); - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - return 0; }