From patchwork Wed Oct 30 22:52:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 21283 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B3AAF244A4 for ; Wed, 30 Oct 2013 22:52:29 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md4sf3469719pbc.4 for ; Wed, 30 Oct 2013 15:52:29 -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=jyXBGnLx75XHvaLI3T00GV625xcXHgEJpLLcKjgPtJk=; b=kabdIN2KsnFNUOFpeiVBjsOWQ56c4i0a2wGnUa3mOyL8Eu6Od175jBohiTnOTsr8Ut 1G9l/pDlTUqZ22aUF3YVo9qUUWVJYYTVnuAhVT/naFqbGcVopS9toqx9hseCjxwtiAII Vbyw9bzx7Q/IFTm7zGSTSASD2wrgmSPjhzaUAYgxbxv4m1SM6HacucegEVDzZrRihQz6 Dh7p9xWMrQabfoVq+mNyvxf6zoJEufJirZyPSaFJyG5cO9rSElvP1g3jEFCtzX/JnjE/ 4WjD25y2FCnhQ7gELFkcu2pQyna7jF1qCyw0TnLAX1891mqqk0TQVdBiThZgaLziiUoK NjnQ== X-Gm-Message-State: ALoCoQkTIMgW3vtJSuK9Dwa+CTdvj1oJQxafsKzOiOVnOHBfOHgeVVQWNTWn4E8qfb3f7KRtsgkj X-Received: by 10.66.227.103 with SMTP id rz7mr388414pac.18.1383173549044; Wed, 30 Oct 2013 15:52:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.67 with SMTP id eo3ls719328qeb.41.gmail; Wed, 30 Oct 2013 15:52:28 -0700 (PDT) X-Received: by 10.221.29.8 with SMTP id rw8mr41676vcb.56.1383173548899; Wed, 30 Oct 2013 15:52:28 -0700 (PDT) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id gs7si71298veb.129.2013.10.30.15.52.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 15:52:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.54 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.54; Received: by mail-vb0-f54.google.com with SMTP id q12so1395696vbe.13 for ; Wed, 30 Oct 2013 15:52:28 -0700 (PDT) X-Received: by 10.58.188.42 with SMTP id fx10mr16220vec.51.1383173548819; Wed, 30 Oct 2013 15:52:28 -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 u4csp316048vcz; Wed, 30 Oct 2013 15:52:28 -0700 (PDT) X-Received: by 10.182.28.35 with SMTP id y3mr33019obg.55.1383173548089; Wed, 30 Oct 2013 15:52:28 -0700 (PDT) Received: from mail-oa0-f53.google.com (mail-oa0-f53.google.com [209.85.219.53]) by mx.google.com with ESMTPS id ck3si127055oeb.60.2013.10.30.15.52.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 15:52:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.219.53 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.219.53; Received: by mail-oa0-f53.google.com with SMTP id n12so2195202oag.26 for ; Wed, 30 Oct 2013 15:52:27 -0700 (PDT) X-Received: by 10.60.58.166 with SMTP id s6mr113926oeq.40.1383173547818; Wed, 30 Oct 2013 15:52:27 -0700 (PDT) Received: from localhost (sccc-66-78-236-243.smartcity.com. [66.78.236.243]) by mx.google.com with ESMTPSA id j9sm710082oef.8.2013.10.30.15.52.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 30 Oct 2013 15:52:27 -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 07/16] cpufreq: imx6q: use cpufreq_generic_get() routine Date: Thu, 31 Oct 2013 04:22:05 +0530 Message-Id: <7d719cd3e73f6acc0e27a9b8bd2efdf295350b96.1383173230.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.54 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. Acked-by: Shawn Guo Signed-off-by: Viresh Kumar --- drivers/cpufreq/imx6q-cpufreq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 4b3f18e..eacd785 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -35,11 +35,6 @@ static struct device *cpu_dev; static struct cpufreq_frequency_table *freq_table; static unsigned int transition_latency; -static unsigned int imx6q_get_speed(unsigned int cpu) -{ - return clk_get_rate(arm_clk) / 1000; -} - static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) { struct dev_pm_opp *opp; @@ -134,13 +129,14 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) static int imx6q_cpufreq_init(struct cpufreq_policy *policy) { + policy->clk = arm_clk; return cpufreq_generic_init(policy, freq_table, transition_latency); } static struct cpufreq_driver imx6q_cpufreq_driver = { .verify = cpufreq_generic_frequency_table_verify, .target_index = imx6q_set_target, - .get = imx6q_get_speed, + .get = cpufreq_generic_get, .init = imx6q_cpufreq_init, .exit = cpufreq_generic_exit, .name = "imx6q-cpufreq",