From patchwork Fri Sep 13 12:59:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20064 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 116CC202E6 for ; Fri, 13 Sep 2013 13:04:13 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id db12sf1214786veb.10 for ; Fri, 13 Sep 2013 06:04:12 -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=WFK4IrZt7xF4fhWWfjoAioUNKzMx5dN1Fz3Ukv6S158=; b=LFMLkdGR/pu8KbFsR8cqXdixaXkYV/qBxATRrikJq0nh+v2+nzqA82ih/B9pX+LiP/ VyO4JVpziHl0Xtxf+OTLaAEzhup06OHdyNqTEG7rJXKRu2gF5X/GMDvKEsAsSVjW0a6i EShZp5t4eNIjSwlrox72/0jmf+Jbg4biEqHf8GrTB6t0osQV01sJoy2ffWa65tm7L7/H SG/aEHZm8STSJqw8TbsEBjs57i5vJZeMFWmz5thBgfx05bvGxAHUN5z16hRWHaZ1yAJo ICpGVTvrmKfoFcrXX9yajoG9R+AiqOQxGVxyA/7qIvxlP9MfyDVvBRcpM7ruzMp7uwlI p2uQ== X-Gm-Message-State: ALoCoQkAzCwEnwuDS1NxHMPVyd9l6c+x3coceEGDkT3UNAT+lT4q5BhUxH2xL5u4u1nv6pV3mdwE X-Received: by 10.58.221.6 with SMTP id qa6mr852670vec.33.1379077452835; Fri, 13 Sep 2013 06:04:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.116 with SMTP id 20ls1105882qed.34.gmail; Fri, 13 Sep 2013 06:04:12 -0700 (PDT) X-Received: by 10.220.244.132 with SMTP id lq4mr219993vcb.31.1379077452612; Fri, 13 Sep 2013 06:04:12 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id fa1si3100354ved.51.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:04:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id jz11so901064veb.25 for ; Fri, 13 Sep 2013 06:04:12 -0700 (PDT) X-Received: by 10.58.155.68 with SMTP id vu4mr7073887veb.21.1379077452521; Fri, 13 Sep 2013 06:04: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 u4csp79446vcz; Fri, 13 Sep 2013 06:04:11 -0700 (PDT) X-Received: by 10.68.203.195 with SMTP id ks3mr13210704pbc.83.1379077451592; Fri, 13 Sep 2013 06:04:11 -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 if6si7388622pbc.223.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:04:11 -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 rp2so1224395pbb.0 for ; Fri, 13 Sep 2013 06:04:11 -0700 (PDT) X-Received: by 10.66.139.166 with SMTP id qz6mr15415672pab.88.1379077451097; Fri, 13 Sep 2013 06:04:11 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id tz3sm11647817pbc.20.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:04:10 -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 , Eric Miao Subject: [PATCH 010/228] cpufreq: pxa: call cpufreq_frequency_table_get_attr() Date: Fri, 13 Sep 2013 18:29:16 +0530 Message-Id: <44ca549f392bb5fbf3536918cfa0cc4f7a09f891.1379063063.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.128.180 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: , This exposes frequency table of driver to cpufreq core and is required for core to guess what the index for a target frequency is, when it calls cpufreq_frequency_table_target(). And so this driver needs to expose it. Cc: Eric Miao Signed-off-by: Viresh Kumar --- drivers/cpufreq/pxa2xx-cpufreq.c | 6 +++++- drivers/cpufreq/pxa3xx-cpufreq.c | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index 8749eaf18..5b8ce9a 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -453,10 +453,14 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) find_freq_tables(&pxa255_freq_table, &pxa255_freqs); pr_info("PXA255 cpufreq using %s frequency table\n", pxa255_turbo_table ? "turbo" : "run"); + cpufreq_frequency_table_cpuinfo(policy, pxa255_freq_table); + cpufreq_frequency_table_get_attr(pxa255_freq_table, policy->cpu); } - else if (cpu_is_pxa27x()) + else if (cpu_is_pxa27x()) { cpufreq_frequency_table_cpuinfo(policy, pxa27x_freq_table); + cpufreq_frequency_table_get_attr(pxa27x_freq_table, policy->cpu); + } printk(KERN_INFO "PXA CPU frequency change support initialized\n"); diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index d26306f..8f14234 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -91,7 +91,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy, struct pxa3xx_freq_info *freqs, int num) { struct cpufreq_frequency_table *table; - int i; + int i, ret; table = kzalloc((num + 1) * sizeof(*table), GFP_KERNEL); if (table == NULL) @@ -108,7 +108,11 @@ static int setup_freqs_table(struct cpufreq_policy *policy, pxa3xx_freqs_num = num; pxa3xx_freqs_table = table; - return cpufreq_frequency_table_cpuinfo(policy, table); + ret = cpufreq_frequency_table_cpuinfo(policy, table); + if (!ret) + cpufreq_frequency_table_get_attr(table, policy->cpu); + + return ret; } static void __update_core_freq(struct pxa3xx_freq_info *info)