From patchwork Thu Jun 2 22:45:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 845262 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p52MjtsP004588 for ; Thu, 2 Jun 2011 22:45:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752802Ab1FBWpy (ORCPT ); Thu, 2 Jun 2011 18:45:54 -0400 Received: from na3sys009aog109.obsmtp.com ([74.125.149.201]:57855 "EHLO na3sys009aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752599Ab1FBWpx (ORCPT ); Thu, 2 Jun 2011 18:45:53 -0400 Received: from mail-pw0-f47.google.com ([209.85.160.47]) (using TLSv1) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKTegSn9iDaN05+cjgRxbAGrwN1iezPnkb@postini.com; Thu, 02 Jun 2011 15:45:53 PDT Received: by mail-pw0-f47.google.com with SMTP id 9so770903pwj.20 for ; Thu, 02 Jun 2011 15:45:51 -0700 (PDT) Received: by 10.143.26.29 with SMTP id d29mr204150wfj.438.1307054751533; Thu, 02 Jun 2011 15:45:51 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id p5sm909230pbk.4.2011.06.02.15.45.40 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Jun 2011 15:45:43 -0700 (PDT) From: Kevin Hilman To: Nishanth Menon Cc: linux-omap Subject: Re: [PM-WIP_CPUFREQ][PATCH v4 2/4] OMAP2+: cpufreq: use OPP library Organization: Texas Instruments, Inc. References: <1306463960-27340-1-git-send-email-nm@ti.com> <1306463960-27340-3-git-send-email-nm@ti.com> Date: Thu, 02 Jun 2011 15:45:39 -0700 In-Reply-To: <1306463960-27340-3-git-send-email-nm@ti.com> (Nishanth Menon's message of "Thu, 26 May 2011 19:39:18 -0700") Message-ID: <87zklzq2cs.fsf@ti.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 02 Jun 2011 22:45:55 +0000 (UTC) Nishanth Menon writes: > OMAP2 is the only family using clk_[init|exit]_cpufreq_table, however, > the cpufreq code has does not use clk_init_cpufreq_table. As a result, > it is unusuable for OMAP2 and only usable only on platforms using OPP > library. > > So move the compilation for cpufreq only if OPP is available for the > architecture and deny OMAP2 in multi-OMAP builds until OMAP2 is fixed. > > Signed-off-by: Nishanth Menon I updated this patch slightly, preferring a more generic failure mode, namely just failing with a warning on init when no OPPs are present. I tested this on 3430/n900 by simply commenting out the omap_init_opp_table() for OMAP3. CPUfreq init fails predictably with platform mpu.0: opp_init_cpufreq_table: Device OPP not found (-19) platform mpu.0: omap_cpu_init: cpu0: failed creating freq table[-19] So CPUfreq driver never gets registered. Updated patch below. If you're OK with this change, I'll apply it to pm-wip/cpufreq. Kevin From 22f1704e2ec30816e34b3d46a4c61513441fce8d Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 26 May 2011 19:39:18 -0700 Subject: [PATCH 2/4] OMAP2+: cpufreq: only supports OPP library OMAP2 is the only family using clk_[init|exit]_cpufreq_table, however, the cpufreq code does not currently use clk_init_cpufreq_table. As a result, it is unusuable for OMAP2 and only usable only on platforms using OPP library. Remove the unbalanced clk_exit_cpufreq_table(). Any platforms where OPPs are not availble will fail on init because a freq table will not be properly initialized. Signed-off-by: Nishanth Menon [khilman@ti.com: changelog edits, and graceful failure mode changes] Acked-by: Kevin Hilman --- arch/arm/mach-omap2/omap2plus-cpufreq.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c index acf18e8..3af7cda 100644 --- a/arch/arm/mach-omap2/omap2plus-cpufreq.c +++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c @@ -1,7 +1,7 @@ /* * OMAP2PLUS cpufreq driver * - * CPU frequency scaling for OMAP + * CPU frequency scaling for OMAP using OPP information * * Copyright (C) 2005 Nokia Corporation * Written by Tony Lindgren @@ -203,7 +203,6 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) static int omap_cpu_exit(struct cpufreq_policy *policy) { - clk_exit_cpufreq_table(&freq_table); clk_put(mpu_clk); return 0; }