From patchwork Fri Sep 13 13:01:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20171 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8996D20358 for ; Fri, 13 Sep 2013 13:16:54 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id ht10sf1196800vcb.9 for ; Fri, 13 Sep 2013 06:16:54 -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=OYXSiVr45ifu1tbWSCpPUwFXKEeF6TId8NuiOW3ld2s=; b=ROIeOKuj4x00IwvLfILY1qYxgjo0zxorBWqHd794Tck6Ubm+I7JN3NzYPU0yektCWv Otc8Lo1jFmkPp6m9Ic8ALbSQ4MZiK0IDIW2Zjm2fBlUqijtL86BkDzXBVHrdPZes+Pdp y2Gq1Kj5SVDrUoXHWK91jDCGe7eDvN89X2vs+ljy6xVWbFFm9WmwkdbQ0tNqaN3gycCD UM16nAk6NEBaIHm/iF98+XmMBvnfled1dHwwNZVJpo5Ga3UJmTVSa7rLiu2U4h6HZrZ9 qDn1W12U82GN58SBOCIq0iKVFwFADR17cHZtuhNljOfLkX+iQRtlMTfiOxuNd8OsiagM 85/Q== X-Gm-Message-State: ALoCoQkOAiYBUO8y0fX4x0vsT97WpVB2YGPk3AqdWCsPN4A9OH9BFr/4LZMtFDsNA0li364R0o+u X-Received: by 10.236.110.168 with SMTP id u28mr4986767yhg.40.1379078214309; Fri, 13 Sep 2013 06:16:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.70 with SMTP id i6ls1116663qei.26.gmail; Fri, 13 Sep 2013 06:16:54 -0700 (PDT) X-Received: by 10.58.100.144 with SMTP id ey16mr1672955veb.25.1379078214039; Fri, 13 Sep 2013 06:16:54 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id wp10si3088088vdb.136.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:16:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 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.175; Received: by mail-vc0-f175.google.com with SMTP id ia10so899392vcb.34 for ; Fri, 13 Sep 2013 06:16:54 -0700 (PDT) X-Received: by 10.52.119.228 with SMTP id kx4mr10042398vdb.12.1379078213952; Fri, 13 Sep 2013 06:16:53 -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 u4csp80132vcz; Fri, 13 Sep 2013 06:16:53 -0700 (PDT) X-Received: by 10.68.50.165 with SMTP id d5mr1125636pbo.162.1379078213044; Fri, 13 Sep 2013 06:16:53 -0700 (PDT) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by mx.google.com with ESMTPS id xx2si11241595pac.53.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:16:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.178 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.178; Received: by mail-pd0-f178.google.com with SMTP id w10so1239344pde.37 for ; Fri, 13 Sep 2013 06:16:52 -0700 (PDT) X-Received: by 10.66.217.166 with SMTP id oz6mr15490254pac.22.1379078212631; Fri, 13 Sep 2013 06:16:52 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id ct4sm11692337pbb.41.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:16:52 -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 , Eric Miao Subject: [PATCH 117/228] cpufreq: pxa: don't initialize part of policy that is set by core too Date: Fri, 13 Sep 2013 18:31:03 +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.175 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 82905fe..29aca57 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -397,8 +397,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 ae3ac08..47fbee4 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -201,11 +201,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,