From patchwork Tue Apr 28 09:48:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 20382 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3S9o4Hf025572 for ; Tue, 28 Apr 2009 09:50:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753555AbZD1Jtd (ORCPT ); Tue, 28 Apr 2009 05:49:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754516AbZD1Jtd (ORCPT ); Tue, 28 Apr 2009 05:49:33 -0400 Received: from smtp.nokia.com ([192.100.105.134]:30676 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753555AbZD1Jtc (ORCPT ); Tue, 28 Apr 2009 05:49:32 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n3S9mvUZ012090; Tue, 28 Apr 2009 04:49:29 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 28 Apr 2009 12:49:24 +0300 Received: from mgw-int02.ntc.nokia.com ([172.21.143.97]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 28 Apr 2009 12:49:23 +0300 Received: from localhost.localdomain (esdhcp039225.research.nokia.com [172.21.39.225]) by mgw-int02.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id n3S9nKuC020988; Tue, 28 Apr 2009 12:49:22 +0300 From: Roger Quadros To: khilman@deeprootsystems.com Cc: linux-omap@vger.kernel.org, rnayak@ti.com, Roger Quadros Subject: [RFC][PATCH 1/2] OMAP: PM: Fix boot with OMAP_SMARTREFLEX and OMAP_PM_NOOP Date: Tue, 28 Apr 2009 12:48:41 +0300 Message-Id: <1240912122-12654-2-git-send-email-ext-roger.quadros@nokia.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1240912122-12654-1-git-send-email-ext-roger.quadros@nokia.com> References: <1240912122-12654-1-git-send-email-ext-roger.quadros@nokia.com> X-OriginalArrivalTime: 28 Apr 2009 09:49:23.0660 (UTC) FILETIME=[9C5E48C0:01C9C7E6] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Roger Quadros Return sane values for all *_get_opp() and *_get_freq() functions. Other modules e.g. Smartreflex will be requiring sane values of OPP and CPU Frequency irrespective of the PM layer being used. Signed-off-by: Roger Quadros --- arch/arm/mach-omap2/Makefile | 1 + arch/arm/plat-omap/Makefile | 3 ++- arch/arm/plat-omap/omap-pm-noop.c | 15 ++++++--------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index c58bab4..b82df3f 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -34,6 +34,7 @@ obj-$(CONFIG_OMAP_SMARTREFLEX) += smartreflex.o obj-$(CONFIG_ARCH_OMAP2) += clock24xx.o obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o obj-$(CONFIG_OMAP_PM_SRF) += resource34xx.o +obj-$(CONFIG_OMAP_PM_NOOP) += resource34xx.o # DSP obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index 3d7b517..038cdaf 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile @@ -27,6 +27,7 @@ obj-y += $(i2c-omap-m) $(i2c-omap-y) # OMAP mailbox framework obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o -obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o +obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o \ + resource.o obj-$(CONFIG_OMAP_PM_SRF) += omap-pm-srf.o \ resource.o diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/plat-omap/omap-pm-noop.c index 490bc8e..f384df3 100644 --- a/arch/arm/plat-omap/omap-pm-noop.c +++ b/arch/arm/plat-omap/omap-pm-noop.c @@ -23,7 +23,7 @@ /* Interface documentation is in mach/omap-pm.h */ #include - +#include #include struct omap_opp *dsp_opps; @@ -194,8 +194,7 @@ u8 omap_pm_dsp_get_opp(void) * Call clk_get_rate() on the OPP custom clock, map that to an * OPP ID using the tables defined in board-*.c/chip-*.c files. */ - - return 0; + return resource_get_level("vdd1_opp"); } u8 omap_pm_vdd1_get_opp(void) @@ -205,8 +204,7 @@ u8 omap_pm_vdd1_get_opp(void) /* * For l-o call resource_get_level of vdd1_opp resource. */ - - return 0; + return resource_get_level("vdd1_opp"); } u8 omap_pm_vdd2_get_opp(void) @@ -216,8 +214,7 @@ u8 omap_pm_vdd2_get_opp(void) /* * For l-o call resource_get_level of vdd2_opp resource. */ - - return 0; + return resource_get_level("vdd2_opp"); } /* @@ -267,8 +264,7 @@ unsigned long omap_pm_cpu_get_freq(void) /* * Call clk_get_rate() on the mpu_ck. */ - - return 0; + return resource_get_level("mpu_freq"); } /* @@ -345,6 +341,7 @@ int __init omap_pm_if_early_init(struct omap_opp *mpu_opp_table, /* Must be called after clock framework is initialized */ int __init omap_pm_if_init(void) { + resource_init(resources_omap); return 0; }