From patchwork Thu May 27 13:19:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjeev Premi X-Patchwork-Id: 102683 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4RDJd5E026180 for ; Thu, 27 May 2010 13:19:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754247Ab0E0NTi (ORCPT ); Thu, 27 May 2010 09:19:38 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:54596 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750966Ab0E0NTh convert rfc822-to-8bit (ORCPT ); Thu, 27 May 2010 09:19:37 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o4RDJYSl003952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 27 May 2010 08:19:37 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id o4RDJYEs010652 for ; Thu, 27 May 2010 18:49:34 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Thu, 27 May 2010 18:49:34 +0530 From: "Premi, Sanjeev" To: "linux-omap@vger.kernel.org" Date: Thu, 27 May 2010 18:49:32 +0530 Subject: RE: omap3 pm: dependency between opp layer and cpufreq Thread-Topic: omap3 pm: dependency between opp layer and cpufreq Thread-Index: Acr9j1u7o3JJataSSaKlz3q3meWahgAD7/RQ Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US 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.3 (demeter.kernel.org [140.211.167.41]); Thu, 27 May 2010 13:19:39 +0000 (UTC) diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index 2b9ebf0..18d291f 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile @@ -15,7 +15,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o # OPP support in (OMAP3+ only at the moment) # XXX The OPP TWL/TPS code should only be included when a TWL/TPS # PMIC is selected. -ifdef CONFIG_CPU_FREQ +ifdef CONFIG_TWL4030_POWER obj-$(CONFIG_ARCH_OMAP3) += opp.o opp_twl_tps.o endif diff --git a/arch/arm/plat-omap/include/plat/opp.h b/arch/arm/plat-omap/include/plat/opp.h index 7d16a46..03463d5 100644 --- a/arch/arm/plat-omap/include/plat/opp.h +++ b/arch/arm/plat-omap/include/plat/opp.h @@ -67,6 +67,14 @@ struct omap_opp_def { struct omap_opp; #ifdef CONFIG_CPU_FREQ +void opp_init_cpufreq_table(enum opp_t opp_type, + struct cpufreq_frequency_table **table); +#else +static inline void opp_init_cpufreq_table(struct omap_opp *opps, + struct cpufreq_frequency_table **table) +{ +} +#endif /** * opp_get_voltage() - Gets the voltage corresponding to an opp @@ -233,79 +241,4 @@ struct omap_opp * __deprecated opp_find_by_opp_id(enum opp_t opp_type, u8 opp_id); u8 __deprecated opp_get_opp_id(struct omap_opp *opp); -void opp_init_cpufreq_table(enum opp_t opp_type, - struct cpufreq_frequency_table **table); -#else -static inline unsigned long opp_get_voltage(const struct omap_opp *opp) -{ - return 0; -} - -static inline unsigned long opp_get_freq(const struct omap_opp *opp) -{ - return 0; -} - -static inline int opp_get_opp_count(struct omap_opp *oppl) -{ - return 0; -} - -static inline struct omap_opp *opp_find_freq_exact(struct omap_opp *oppl, - unsigned long freq, bool enabled) -{ - return ERR_PTR(-EINVAL); -} - -static inline struct omap_opp *opp_find_freq_floor(struct omap_opp *oppl, - unsigned long *freq) -{ - return ERR_PTR(-EINVAL); -} - -static inline struct omap_opp *opp_find_freq_ceil(struct omap_opp *oppl, - unsigned long *freq) -{ - return ERR_PTR(-EINVAL); -} - -static inline -struct omap_opp __init *opp_init_list(const struct omap_opp_def *opp_defs) -{ - return ERR_PTR(-EINVAL); -} - -static inline struct omap_opp *opp_add(struct omap_opp *oppl, - const struct omap_opp_def *opp_def) -{ - return ERR_PTR(-EINVAL); -} - -static inline int opp_enable(struct omap_opp *opp) -{ - return 0; -} - -static inline int opp_disable(struct omap_opp *opp) -{ - return 0; -} - -static inline struct omap_opp * __deprecated -opp_find_by_opp_id(struct omap_opp *opps, u8 opp_id) -{ - return ERR_PTR(-EINVAL); -} - -static inline u8 __deprecated opp_get_opp_id(struct omap_opp *opp) -{ - return 0; -} - -static inline void opp_init_cpufreq_table(struct omap_opp *opps, - struct cpufreq_frequency_table **table) -{ -} - -#endif /* CONFIG_CPU_FREQ */ #endif /* __ASM_ARM_OMAP_OPP_H */ diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c index 13da451..76466fb 100644 --- a/arch/arm/plat-omap/opp.c +++ b/arch/arm/plat-omap/opp.c @@ -352,7 +352,7 @@ int opp_disable(struct omap_opp *opp) return 0; } -/* XXX document */ +#ifdef CONFIG_CPU_FREQ void opp_init_cpufreq_table(enum opp_t opp_type, struct cpufreq_frequency_table **table) { @@ -397,3 +397,4 @@ void opp_init_cpufreq_table(enum opp_t opp_type, *table = &freq_table[0]; } +#endif