From patchwork Sat Aug 31 17:23:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 271552 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id EAF052C046D for ; Sun, 1 Sep 2013 03:29:09 +1000 (EST) Received: from filtteri5.pp.htv.fi (filtteri5.pp.htv.fi [213.243.153.188]) by ozlabs.org (Postfix) with ESMTP id D96BC2C00C0 for ; Sun, 1 Sep 2013 03:26:13 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by filtteri5.pp.htv.fi (Postfix) with ESMTP id CBC6E5A6D8A; Sat, 31 Aug 2013 20:26:09 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp4.welho.com ([213.243.153.38]) by localhost (filtteri5.pp.htv.fi [213.243.153.188]) (amavisd-new, port 10024) with ESMTP id paZQa4tTD454; Sat, 31 Aug 2013 20:26:04 +0300 (EEST) Received: from blackmetal.pp.htv.fi (cs181064211.pp.htv.fi [82.181.64.211]) by smtp4.welho.com (Postfix) with ESMTP id DCB0B5BC012; Sat, 31 Aug 2013 20:26:04 +0300 (EEST) From: Aaro Koskinen To: "Rafael J. Wysocki" , Viresh Kumar , Benjamin Herrenschmidt , linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 2/3] cpufreq: pmac64: provide cpufreq transition latency for older G5 models Date: Sat, 31 Aug 2013 20:23:51 +0300 Message-Id: <1377969832-27699-3-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1377969832-27699-1-git-send-email-aaro.koskinen@iki.fi> References: <1377969832-27699-1-git-send-email-aaro.koskinen@iki.fi> Cc: Aaro Koskinen X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16rc2 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Currently cpufreq ondemand governor cannot used on older G5 models, because the transition latency is set to CPUFREQ_ETERNAL. Provide a value based on a measurement on Xserve G5, which happens to be also the highest allowed latency. Signed-off-by: Aaro Koskinen --- drivers/cpufreq/pmac64-cpufreq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c index 674807d..d3d1995 100644 --- a/drivers/cpufreq/pmac64-cpufreq.c +++ b/drivers/cpufreq/pmac64-cpufreq.c @@ -674,8 +674,10 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) g5_cpu_freqs[0].frequency = max_freq; g5_cpu_freqs[1].frequency = min_freq; + /* Based on a measurement on Xserve G5, rounded up. */ + transition_latency = 10 * NSEC_PER_MSEC; + /* Set callbacks */ - transition_latency = CPUFREQ_ETERNAL; g5_switch_volt = g5_pfunc_switch_volt; g5_switch_freq = g5_pfunc_switch_freq; g5_query_freq = g5_pfunc_query_freq;