From patchwork Wed Aug 14 13:32:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19141 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EC7D72390D for ; Wed, 14 Aug 2013 13:36:19 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id cd7sf2515248qab.1 for ; Wed, 14 Aug 2013 06:36:19 -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=63YR77dke40yAu9nw74FfTiwXE1laCHXmdnXqmyw2Y4=; b=KkxEP8kpGU8Z7fK+tpz8lVA3itJTRf+oC67EDmvSg0IQ39iWx6cOkGUu8Pd2hiINRo /FXU+vjA+V8sGmZP7eigHaVzoMKKneZ7hP+5e2zOkNdi4Q3LBIWQigYJh3T4QmUPJEKZ vMqVnA8+0MEH4czXLO+USvBdxT2G+M8JFJJHbRAUGXj8531nrxsoDLi2Kl8UAgAoR6dB GaL5CT7RLbFwSyj5y8dkFge5BwHnM6K5unSLN3meetA3pSEsDXugmtQJifNQ3pGUh1Vz 4Q3k0oe+kSUfHt5Q4C6ulZVm9n3eagPkP+L0Wj85UD/LjKUgp7qqyri4riIEDJKhkPMe K7pw== X-Received: by 10.58.203.133 with SMTP id kq5mr2226815vec.30.1376487379713; Wed, 14 Aug 2013 06:36:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.212 with SMTP id 20ls2164254qeg.25.gmail; Wed, 14 Aug 2013 06:36:19 -0700 (PDT) X-Received: by 10.58.155.37 with SMTP id vt5mr117462veb.41.1376487379565; Wed, 14 Aug 2013 06:36:19 -0700 (PDT) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id f20si11021909vcs.142.2013.08.14.06.36.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:36:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.45 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.45; Received: by mail-vb0-f45.google.com with SMTP id e15so7535683vbg.4 for ; Wed, 14 Aug 2013 06:36:19 -0700 (PDT) X-Gm-Message-State: ALoCoQnQ+LdTtSnuGaxBLbp3NkVwJJQSvQWpaYY2gPUs+9HQHuf8jtV51Ztu+AiINAN1QdHmHy/P X-Received: by 10.221.16.200 with SMTP id pz8mr90150vcb.53.1376487379468; Wed, 14 Aug 2013 06:36:19 -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 u4csp213243vcz; Wed, 14 Aug 2013 06:36:18 -0700 (PDT) X-Received: by 10.68.6.100 with SMTP id z4mr1128976pbz.187.1376487378354; Wed, 14 Aug 2013 06:36:18 -0700 (PDT) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id xy3si786837pbb.194.2013.08.14.06.36.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:36:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.42; Received: by mail-pa0-f42.google.com with SMTP id lj1so10118266pab.29 for ; Wed, 14 Aug 2013 06:36:18 -0700 (PDT) X-Received: by 10.66.146.199 with SMTP id te7mr10035069pab.106.1376487377968; Wed, 14 Aug 2013 06:36:17 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ll5sm53367763pab.19.2013.08.14.06.36.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:36:17 -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, Viresh Kumar , Eric Miao Subject: [PATCH 28/37] cpufreq: pxa: don't initialize part of policy that is set by core too Date: Wed, 14 Aug 2013 19:02:17 +0530 Message-Id: <7c73727c0fa0aa486ecf945693924918369a75b4.1376486713.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.45 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(). Cc: Eric Miao Signed-off-by: Viresh Kumar --- drivers/cpufreq/pxa2xx-cpufreq.c | 2 -- drivers/cpufreq/pxa3xx-cpufreq.c | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index a91274a..183bc13 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -388,8 +388,6 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) /* set default policy and cpuinfo */ policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ - policy->cur = get_clk_frequency_khz(0); /* current freq */ - policy->min = policy->max = policy->cur; /* Generate pxa25x the run cpufreq_frequency_table struct */ for (i = 0; i < NUM_PXA25x_RUN_FREQS; i++) { diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index 61e3e6a..132e37d 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -190,11 +190,10 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy) int ret = -EINVAL; /* set default policy and cpuinfo */ - policy->cpuinfo.min_freq = 104000; - policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000; + policy->min = policy->cpuinfo.min_freq = 104000; + policy->max = policy->cpuinfo.max_freq = + (cpu_is_pxa320()) ? 806000 : 624000; policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ - policy->max = pxa3xx_get_clk_frequency_khz(0); - policy->cur = policy->min = policy->max; if (cpu_is_pxa300() || cpu_is_pxa310()) ret = setup_freqs_table(policy, pxa300_freqs,