From patchwork Wed Oct 30 22:52:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 21289 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 93C52244A4 for ; Wed, 30 Oct 2013 22:52:41 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id pa12sf4711569veb.10 for ; Wed, 30 Oct 2013 15:52:41 -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=vXMetgtf6uBLAUB5eQTbEYB5TeSsxs9KUkzpFZL8w6w=; b=AHUDO0c3e0aZCwMhFgAyztfnZxy0eN6qBvHTYW9MZuPOUPdeeYRmUC1oH5+yTUjUNO Nd16N+CApmgJG3bq/hcYyNBnRZVhcnuQST9PEi1Q7tXAuxIMP6HALClWIGCCsobsdSD5 nOGr8o152ONjmc7Ns5xOKJF3hba4y1WFs5VLIU00uetfIPY9vGdzdq3v58jN5LTpN88c NBeFnxZzB/fUSb6zLmcuptRXEU0NTanNyOJsP/73NtOULgZFbYmvV/hQ+5OqLDL1cmkI 0ROF1e9MzBbQzPtT23NH9ZlM1sdDumKdnNcVq6yRgoevhtj0JlRPlcOVfvD71/BDcVzk jbqQ== X-Gm-Message-State: ALoCoQmACxFJFMb0Cq8M1ROFHSEDhiLxEfEIw9KyUECzq/A4fJkrmnbE+dLAd7zdGh3asBPaaf1o X-Received: by 10.236.176.1 with SMTP id a1mr197505yhm.10.1383173561303; Wed, 30 Oct 2013 15:52:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.72.227 with SMTP id g3ls96263qev.57.gmail; Wed, 30 Oct 2013 15:52:41 -0700 (PDT) X-Received: by 10.52.69.200 with SMTP id g8mr46305vdu.36.1383173561201; Wed, 30 Oct 2013 15:52:41 -0700 (PDT) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id v5si85293ves.42.2013.10.30.15.52.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 15:52:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.53 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.53; Received: by mail-vb0-f53.google.com with SMTP id i11so1341750vbh.26 for ; Wed, 30 Oct 2013 15:52:41 -0700 (PDT) X-Received: by 10.58.34.129 with SMTP id z1mr32968vei.96.1383173561125; Wed, 30 Oct 2013 15:52:41 -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 u4csp316062vcz; Wed, 30 Oct 2013 15:52:40 -0700 (PDT) X-Received: by 10.60.131.232 with SMTP id op8mr19995oeb.75.1383173560609; Wed, 30 Oct 2013 15:52:40 -0700 (PDT) Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by mx.google.com with ESMTPS id w10si128392obo.56.2013.10.30.15.52.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 15:52:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.170 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.214.170; Received: by mail-ob0-f170.google.com with SMTP id wp18so2232388obc.15 for ; Wed, 30 Oct 2013 15:52:40 -0700 (PDT) X-Received: by 10.182.135.194 with SMTP id pu2mr119764obb.38.1383173560333; Wed, 30 Oct 2013 15:52:40 -0700 (PDT) Received: from localhost (sccc-66-78-236-243.smartcity.com. [66.78.236.243]) by mx.google.com with ESMTPSA id tz10sm601679obc.10.2013.10.30.15.52.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 30 Oct 2013 15:52:39 -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@linaro.org Subject: [PATCH V2 Resend 13/16] cpufreq: spear: use cpufreq_generic_get() routine Date: Thu, 31 Oct 2013 04:22:11 +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.212.53 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 d02ccd1..5bed954 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,