OMAP3: PM: Fix compilation issue of omap opp layer functions
PATCH v2 1/1 OMAP3: PM: Fix compilation issue of omap opp layer functions
From: Eduardo Valentin <[email protected]>
This patch removes the compilation error when compiling kernel with CONFIG_PM=N. The problem was that omap3_pm_init_opp_table was not defined if CONFIG_PM=N.
Besides, OMAP OPP layer functions now have dependencies of CONFIG_PM and CONFIG_CPU_FREQ.
Signed-off-by Eduardo Valentin <[email protected]>
--- arch/arm/mach-omap2/pm.h | 6 ++ arch/arm/mach-omap2/pm34xx.c | 4 + arch/arm/plat-omap/Makefile | 4 + arch/arm/plat-omap/include/plat/opp.h | 143 +++++++++++++++++++++++++-------- 4 files changed, 122 insertions(+), 35 deletions(-)
arch/arm/mach-omap2/pm.h +6 -0
@@ -69,7 +69,13 @@ static inline void omap3_pm_init_vc(struct prm_setup_vc *setup_vc)* Initialize the basic opp table here, board files could choose to modify opp * table after the basic initialization */ +#if defined(CONFIG_PM ) && defined(CONFIG_CPU_FREQ )extern void omap3_pm_init_opp_table (void ); +#else +static inline void omap3_pm_init_opp_table (void ) +{ +} +#endif extern int omap3_pm_get_suspend_state (struct powerdomain *pwrdm);extern int omap3_pm_set_suspend_state (struct powerdomain *pwrdm,int state);
arch/arm/mach-omap2/pm34xx.c +4 -0
@@ -113,6 +113,7 @@ static struct prm_setup_vc prm_setup = { .vdd1_off = 0x00, /* 0.6v */ }; +#ifdef CONFIG_CPU_FREQ static struct omap_opp_def __initdata omap34xx_mpu_rate_table[] = {/* OPP1 */ OMAP_OPP_DEF(true, 125000000, 975000),
@@ -188,6 +189,7 @@ static struct omap_opp_def __initdata omap36xx_dsp_rate_table[] = {/* Terminator */ OMAP_OPP_DEF (0 ,0 ,0 ) }; +#endif static inline void omap3_per_save_context (void ) {
@@ -1351,6 +1353,7 @@ static void __init configure_vc(void) OMAP3_PRM_VOLTSETUP2_OFFSET); } +#ifdef CONFIG_CPU_FREQ void __init omap3_pm_init_opp_table (void ) {int i;
@@ -1379,6 +1382,7 @@ void __init omap3_pm_init_opp_table(void) BUG_ON(IS_ERR(omap3_rate_tables[i])); } } +#endif static int __init omap3_pm_early_init (void ) {
arch/arm/plat-omap/Makefile +4 -0
@@ -15,7 +15,11 @@ 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_PM +ifdef CONFIG_CPU_FREQ obj-$(CONFIG_ARCH_OMAP3) += opp.o opp_twl_tps.o +endif +endif # omap_device support (OMAP2+ only at the moment) obj-$(CONFIG_ARCH_OMAP2) += omap_device.o
arch/arm/plat-omap/include/plat/opp.h +108 -35
161 lines not on this page · raw message
Signature · 1 line
1.6.5.7.g9ecb2
Quoted 5 lines · Eduardo Valentin
From: Eduardo Valentin <[email protected]>
This patch removes the compilation error when compiling kernel with
CONFIG_PM=N. The problem was thatomap3_pm_init_opp_tablewas not defined ifCONFIG_PM=N.
NAK. See reply to your other thread.