From patchwork Fri Sep 13 13:02:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20280 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 09E9520358 for ; Fri, 13 Sep 2013 13:29:55 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l4sf1178402yen.2 for ; Fri, 13 Sep 2013 06:29:55 -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=BKh+cBlTF8i4bs62usm/sVJffC64kT+JCaYTTgNzf1Y=; b=XyIs8iCbFOeZECPF0dx0O0BZKtCjO7t/sb+0KQ5lyJqs60/JKuysyGAa6OqvIrwRAm cZYCCpUbm93jmiIypUyhwDNRCeiEqhP7cfiQ/Ae4o3sUJBHl6jKVZlOFg28Aa0o5brwS Dkh7gX5TxYnLZQ2VHdpZKa+M7vsLs/B+T4QTa5IDeJtr/iHw5kSW4Mq4ljhTSOS0ancC LEhmcZ1N5nNB/qnJzpO/QgJbA8BEbNAX3kDVC/Cp3ZDzXuJ7fwqYxLBpMBa6lBcwyJ/d jxfPjAXoBir4ESQ6Eo0XUfRqSPd6sv1zQuMYnuIoVDvanPnb2IKg5a3YYpI7853oWfAg J8tg== X-Gm-Message-State: ALoCoQnKZX9E0b15vnkfGmFhpkot6z3hsS7zYXAQ9wEOekkmmYqn4R8MHLM7xKpPbrU5Bm0xViZU X-Received: by 10.236.26.202 with SMTP id c50mr5038201yha.14.1379078995725; Fri, 13 Sep 2013 06:29:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.53.103 with SMTP id a7ls1030511qep.90.gmail; Fri, 13 Sep 2013 06:29:55 -0700 (PDT) X-Received: by 10.220.244.132 with SMTP id lq4mr326574vcb.31.1379078995513; Fri, 13 Sep 2013 06:29:55 -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 se9si3109612vdc.127.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:29:55 -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 c14so941913vea.24 for ; Fri, 13 Sep 2013 06:29:55 -0700 (PDT) X-Received: by 10.220.145.75 with SMTP id c11mr339597vcv.30.1379078995445; Fri, 13 Sep 2013 06:29:55 -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 u4csp80832vcz; Fri, 13 Sep 2013 06:29:54 -0700 (PDT) X-Received: by 10.68.252.233 with SMTP id zv9mr13371661pbc.69.1379078994589; Fri, 13 Sep 2013 06:29:54 -0700 (PDT) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx.google.com with ESMTPS id sl4si11274736pac.68.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:29:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.54; Received: by mail-pa0-f54.google.com with SMTP id kx10so2549379pab.27 for ; Fri, 13 Sep 2013 06:29:54 -0700 (PDT) X-Received: by 10.66.253.4 with SMTP id zw4mr15416126pac.119.1379078993921; Fri, 13 Sep 2013 06:29:53 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id gg10sm11757959pbc.46.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:29:53 -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 , spear-devel@list.st.com Subject: [PATCH 226/228] cpufreq: spear: use cpufreq_generic_get() routine Date: Fri, 13 Sep 2013 18:32:52 +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.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: , 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 658cfe7..ea2f26e 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,