From patchwork Fri Aug 23 15:50:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19490 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D7CFE248E6 for ; Fri, 23 Aug 2013 15:55:20 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id a11sf622046qcx.1 for ; Fri, 23 Aug 2013 08:55:20 -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=yEYd5SdObzgGAWtIUVuMESo07wbYIAMO6ypXpEBI8Cg=; b=IGY0QGYkC5J1Pg8gic8ZeJ6ByxqU0kkebelEPD+11VjEPEi01vuWVx4BIxNTFtpJw/ /EcdhfueI4n8cJs2zAdiSHi5fqvWr+9ideZ1PmCCFgH+SiE/1tSTpKcIyp+ooSwQSa7z Ns1qtqOjD3X6j0tyT227PIAIgBqIE/UJrW+74LoUZbblVKmqaBCFR4yd/l596FrU2Kzo w8ti8mEgNBSfG3l3WNjNmNjsQ8PzjaVT+S0+8r9OqZJ9JDcUUDgWOjQyX8JXkb76QTT6 KYv/AYfmhXAFlWYtdBKeghOMeGZv3voI/dK/jv6C6RL7prmuzCDVfRrGlPbJBxS5KYvO xRCw== X-Received: by 10.236.30.129 with SMTP id k1mr84757yha.56.1377273320585; Fri, 23 Aug 2013 08:55:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.107.71 with SMTP id ha7ls1755532qeb.77.gmail; Fri, 23 Aug 2013 08:55:20 -0700 (PDT) X-Received: by 10.221.6.195 with SMTP id ol3mr142960vcb.34.1377273320482; Fri, 23 Aug 2013 08:55:20 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id aa5si127292vdc.91.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 08:55:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 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.170; Received: by mail-vc0-f170.google.com with SMTP id kw10so551285vcb.15 for ; Fri, 23 Aug 2013 08:55:20 -0700 (PDT) X-Gm-Message-State: ALoCoQmuxX2iFv39fbtDUq3w34E7uItxVY1+IMlXuBiAGxc5sHvlP2Zu/+OVo8MfHPNsyHkb/K76 X-Received: by 10.58.155.68 with SMTP id vu4mr157416veb.21.1377273320390; Fri, 23 Aug 2013 08:55:20 -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 u4csp100798vcz; Fri, 23 Aug 2013 08:55:19 -0700 (PDT) X-Received: by 10.66.232.39 with SMTP id tl7mr11773607pac.140.1377273319437; Fri, 23 Aug 2013 08:55:19 -0700 (PDT) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id yk3si808101pac.157.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 08:55:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.46; Received: by mail-pb0-f46.google.com with SMTP id rq2so821820pbb.5 for ; Fri, 23 Aug 2013 08:55:18 -0700 (PDT) X-Received: by 10.68.12.97 with SMTP id x1mr332408pbb.150.1377273318646; Fri, 23 Aug 2013 08:55:18 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ys4sm566852pbb.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 23 Aug 2013 08:55:18 -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 , spear-devel@list.st.com Subject: [PATCH 14/16] cpufreq: spear: use cpufreq_generic_get() routine Date: Fri, 23 Aug 2013 21:20:49 +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.170 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: , We have common infrastructure available with us for getting a CPUs clk rate. Lets use it for this driver. Cc: spear-devel@list.st.com Signed-off-by: Viresh Kumar --- drivers/cpufreq/spear-cpufreq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c index d9a8c5f..942393d 100644 --- a/drivers/cpufreq/spear-cpufreq.c +++ b/drivers/cpufreq/spear-cpufreq.c @@ -30,11 +30,6 @@ static struct { u32 cnt; } spear_cpufreq; -static unsigned int spear_cpufreq_get(unsigned int cpu) -{ - return clk_get_rate(spear_cpufreq.clk) / 1000; -} - static struct clk *spear1340_cpu_get_possible_parent(unsigned long newfreq) { struct clk *sys_pclk; @@ -156,6 +151,7 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy, static int spear_cpufreq_init(struct cpufreq_policy *policy) { + policy->clk = spear_cpufreq.clk; return cpufreq_generic_init(policy, spear_cpufreq.freq_tbl, spear_cpufreq.transition_latency); } @@ -165,7 +161,7 @@ static struct cpufreq_driver spear_cpufreq_driver = { .flags = CPUFREQ_STICKY, .verify = cpufreq_generic_frequency_table_verify, .target_index = spear_cpufreq_target, - .get = spear_cpufreq_get, + .get = cpufreq_generic_get, .init = spear_cpufreq_init, .exit = cpufreq_generic_exit, .attr = cpufreq_generic_attr,