From patchwork Fri Aug 23 15:50:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19484 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3B5D6248E6 for ; Fri, 23 Aug 2013 15:53:34 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id ht10sf600990vcb.5 for ; Fri, 23 Aug 2013 08:53:34 -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=NyCJuqXcYAUe78ZI/6f3dM1EiRKqSUcSUbI88PLERrs=; b=ELkca63d5zh3uPQ4IZsqw3TdvYAack38w2kPiV+L8rM5QD37yHTcngAZqnusyMIdtf 75pzJAWW7fj5zMw7ORChxOtYdkIJdXPpVDwPtXLK4oxL3xXr5Ce2hkr/QQPVMcI5wUle d7xRYzaIhgD2K3YIZl0/dk5lEiqG/kunL3WKBGhBtGuJ4VIK49/TIP2CctU9L3mohNjW uSvwkMbCMijLy8d3ajKaJPkR38TWZQJaaTtNkKVYTSXt68pQVQTNuIhR3o8Q2Ht1MxEJ SdsqO4Oai4Vw58ygxW8aWdwrYtXWp2kBVUq4hzvpax7qhsXmQeVmsVfOsleJ0fSvwWpR 44WA== X-Received: by 10.236.223.130 with SMTP id v2mr104630yhp.34.1377273214016; Fri, 23 Aug 2013 08:53:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.47.82 with SMTP id b18ls1555276qen.53.gmail; Fri, 23 Aug 2013 08:53:33 -0700 (PDT) X-Received: by 10.220.98.212 with SMTP id r20mr127857vcn.48.1377273213939; Fri, 23 Aug 2013 08:53:33 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id dh7si119856vcb.113.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 08:53:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 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.48; Received: by mail-vb0-f48.google.com with SMTP id w16so532828vbf.21 for ; Fri, 23 Aug 2013 08:53:33 -0700 (PDT) X-Gm-Message-State: ALoCoQnbHuvP0TVUmGd76iE+4sbgRZr7eSLTWHUuz+uuTUksWOeGzxvjtbcZpNfZssMro4dikt1p X-Received: by 10.52.165.239 with SMTP id zb15mr117100vdb.44.1377273213870; Fri, 23 Aug 2013 08:53:33 -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 u4csp100707vcz; Fri, 23 Aug 2013 08:53:33 -0700 (PDT) X-Received: by 10.66.219.200 with SMTP id pq8mr11852170pac.123.1377273212793; Fri, 23 Aug 2013 08:53:32 -0700 (PDT) Received: from mail-pb0-f41.google.com (mail-pb0-f41.google.com [209.85.160.41]) by mx.google.com with ESMTPS id vs7si265604pbc.25.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 08:53:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.41 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.41; Received: by mail-pb0-f41.google.com with SMTP id rp2so829461pbb.14 for ; Fri, 23 Aug 2013 08:53:32 -0700 (PDT) X-Received: by 10.66.163.164 with SMTP id yj4mr12003820pab.91.1377273212292; Fri, 23 Aug 2013 08:53:32 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id qp10sm1851201pab.13.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 23 Aug 2013 08:53:31 -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 , Shawn Guo Subject: [PATCH 08/16] cpufreq: imx6q: use cpufreq_generic_get() routine Date: Fri, 23 Aug 2013 21:20:43 +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.48 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: 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 5efd9b7..52bb625 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; @@ -150,13 +145,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",