From patchwork Fri Sep 13 13:01:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20169 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5EEF020358 for ; Fri, 13 Sep 2013 13:16:40 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id a41sf1237740yho.10 for ; Fri, 13 Sep 2013 06:16:40 -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=LYdYEHApDnOTGa8if4EOPbrtXfcmFrTMNSJjZQu1dtI=; b=LNN5x9cgrN4lCbhoVvu7eQBAbxuyrdbEuBkH0mxxu33s5ydbdaDHt0E8JyPqialvKM UCBIU7UEHvDqiQscDEE336P+HoUEvuZI8RCABF/HL4o6EUoVBU5zjnvk5RhD5AYMMM0W lPSWvFwvwzX9wyl1gnRjxhcIB7AFot7TWjvzo+Sl+vtKVPOlkcKPq7qpKzUEZW8ZAkZ3 fGWFNFSEwxTCnqEwCq1McCb+3sFLMY8SG7mN8otzWW1M8AiwY2lJnLY/V6NC7W/i89Z+ y0TSEQx0B3DcCSDr9Xg6VTlIqbofxofNM25at+iYzYgwoLS9doDMDQWcuZsc2kPe+8Hc fmjw== X-Gm-Message-State: ALoCoQll3Z5+Dt8HWLeyITuovdJAzWZmq4W42aX3sRucjBz1h/5mVLclUH7fwCw7C3qWekxEAdEQ X-Received: by 10.236.93.45 with SMTP id k33mr5152116yhf.19.1379078200162; Fri, 13 Sep 2013 06:16:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.85.200 with SMTP id j8ls1123087qez.6.gmail; Fri, 13 Sep 2013 06:16:39 -0700 (PDT) X-Received: by 10.220.13.20 with SMTP id z20mr12016692vcz.0.1379078199851; Fri, 13 Sep 2013 06:16:39 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id cp3si3096799vcb.133.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:16:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id c14so916915vea.38 for ; Fri, 13 Sep 2013 06:16:39 -0700 (PDT) X-Received: by 10.52.157.134 with SMTP id wm6mr5855115vdb.26.1379078199773; Fri, 13 Sep 2013 06:16:39 -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 u4csp80114vcz; Fri, 13 Sep 2013 06:16:39 -0700 (PDT) X-Received: by 10.66.171.77 with SMTP id as13mr2054483pac.170.1379078198773; Fri, 13 Sep 2013 06:16:38 -0700 (PDT) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by mx.google.com with ESMTPS id pz2si10834362pac.202.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:16:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.44 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.44; Received: by mail-pa0-f44.google.com with SMTP id fz6so2502388pac.17 for ; Fri, 13 Sep 2013 06:16:38 -0700 (PDT) X-Received: by 10.66.179.143 with SMTP id dg15mr15416664pac.52.1379078198333; Fri, 13 Sep 2013 06:16:38 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id xe9sm18083516pab.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:16:37 -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 115/228] cpufreq: powernow: don't initialize part of policy that is set by core too Date: Fri, 13 Sep 2013 18:31:01 +0530 Message-Id: <878d14d018cba46cdd161e21d801dc0f4a0c3189.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.128.179 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: , Many common initializations of struct policy are moved to core now and hence this driver doesn't need to do it. This patch removes such code. Most recent of those changes is to call ->get() in the core after calling ->init(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/powernow-k6.c | 1 - drivers/cpufreq/powernow-k7.c | 2 -- drivers/cpufreq/powernow-k8.c | 3 --- 3 files changed, 6 deletions(-) diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c index ff05d28..eda1702 100644 --- a/drivers/cpufreq/powernow-k6.c +++ b/drivers/cpufreq/powernow-k6.c @@ -151,7 +151,6 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 200000; - policy->cur = busfreq * max_multiplier; return cpufreq_table_validate_and_show(policy, clock_ratio); } diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c index 14cd98f..44d345b 100644 --- a/drivers/cpufreq/powernow-k7.c +++ b/drivers/cpufreq/powernow-k7.c @@ -673,8 +673,6 @@ static int powernow_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = cpufreq_scale(2000000UL, fsb, latency); - policy->cur = powernow_get(0); - return cpufreq_table_validate_and_show(policy, powernow_table); } diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index f054d5b..8721744 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -1161,9 +1161,6 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol) cpumask_copy(pol->cpus, cpu_core_mask(pol->cpu)); data->available_cores = pol->cpus; - pol->cur = find_khz_freq_from_fid(data->currfid); - pr_debug("policy current frequency %d kHz\n", pol->cur); - /* min/max the cpu is capable of */ if (cpufreq_table_validate_and_show(pol, data->powernow_table)) { printk(KERN_ERR FW_BUG PFX "invalid powernow_table\n");