From patchwork Fri Sep 13 13:02:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20274 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7B55620358 for ; Fri, 13 Sep 2013 13:29:13 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id f12sf1213342vbg.7 for ; Fri, 13 Sep 2013 06:29:13 -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=w4tsgoJvKnBtmZCpfkSgUYA2szpv4PepBIthTcMPhiw=; b=L0aLgf5Pnp9naF7C90HvVfUSUrHtKOczbB72DQAlsZREoLPoD+kWrwspeoqKzE8CRu zEJBfg4rE5iJ8F4wzrZcnQt0XNKi/S5zHg6hUoRP5dnS6W6derYc7ZRq2hqCOKJS3ytZ NY1wJmGXmA4xC//TsYF/MTSBFYFcsw5JU5XB+XM9ylYWH6Qv7ud5D//VURPxt9MQLKLE +yF11d+8ZzYcEj3XiV5/dWPipWDGJsJ9Vyd4G0TETj+bwRaXvx8KWagNWsH4Jzdipfa3 SeiObl/Jobb4hUUXJTfwXTT0y2tc6EJGj5bJuYcTNqcq46Rir0redcAHsZZdhR2MRXVs KMog== X-Gm-Message-State: ALoCoQkUOr0qfkLZNrKUjhG8dgrZWvvNyCgf2R9mA7lncCAM/k2vRSq+6Olk5pQUOXdC00ujyqK4 X-Received: by 10.236.145.34 with SMTP id o22mr5189589yhj.22.1379078953251; Fri, 13 Sep 2013 06:29:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.104.111 with SMTP id gd15ls1142539qeb.68.gmail; Fri, 13 Sep 2013 06:29:13 -0700 (PDT) X-Received: by 10.52.34.40 with SMTP id w8mr10142356vdi.7.1379078952992; Fri, 13 Sep 2013 06:29:12 -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 o3si412631ves.124.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:29:12 -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 i3so896518vbh.40 for ; Fri, 13 Sep 2013 06:29:12 -0700 (PDT) X-Received: by 10.221.6.195 with SMTP id ol3mr217783vcb.34.1379078952903; Fri, 13 Sep 2013 06:29:12 -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 u4csp80803vcz; Fri, 13 Sep 2013 06:29:12 -0700 (PDT) X-Received: by 10.68.178.2 with SMTP id cu2mr8861008pbc.161.1379078952077; Fri, 13 Sep 2013 06:29:12 -0700 (PDT) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by mx.google.com with ESMTPS id qc9si11223440pac.211.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:29:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.177 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.177; Received: by mail-pd0-f177.google.com with SMTP id y10so1245220pdj.36 for ; Fri, 13 Sep 2013 06:29:11 -0700 (PDT) X-Received: by 10.66.161.38 with SMTP id xp6mr15104188pab.145.1379078951691; Fri, 13 Sep 2013 06:29:11 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id xn12sm18121303pac.12.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:29:11 -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 Subject: [PATCH 220/228] cpufreq: imx6q: use cpufreq_generic_get() routine Date: Fri, 13 Sep 2013 18:32:46 +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. 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 a3829a0..6993f0d 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -34,11 +34,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 opp *opp; @@ -133,13 +128,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",