pm: omap3: fix build error for PM disabled
PATCH 1/1 pm: omap3: fix build error for PM disabled
omap3_pm_init_opp_table should be under #ifdef CONFIG_PM else build fails when PM is disabled. Reported by Paul originally.
--- arch/arm/mach-omap2/pm.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 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 */ +#ifdef CONFIG_PM 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);
Signature · 1 line
1.6.3.3
Quoted 20 lines · Nishanth Menon
omap3_pm_init_opp_tableshould be under #ifdefCONFIG_PMelse build fails when PM is disabled. Reported by Paul originally.Cc Kevin Hilman <[email protected]>Cc Paul Walmsley <[email protected]>Reported-by Paul Walmsley <[email protected]>Signed-off-by Nishanth Menon <[email protected]>--- arch/arm/mach-omap2/pm.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)arch/arm/mach-omap2/pm.h +0
-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 */
arch/arm/mach-omap2/pm.h static inline void omap3_pm_init_vc(struct prm_setup_vc *setup_vc) · line 81
Quoted 10 lines
arch/arm/mach-omap2/pm.h +6
-0+#ifdef CONFIG_PM 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);
This patch IMHO just solves the build issue. The runtime behaviour is a nasty crash. OMAP architecture has tied CONFIG_PM with CONFIG_CPU_FREQ. So I think we need a fix that solves the runtime behavior too.
Quoted 29 lines · Romit Dasgupta
Quoted 28 lines · Nishanth Menon
omap3_pm_init_opp_tableshould be under #ifdefCONFIG_PMelse build fails when PM is disabled. Reported by Paul originally.Cc Kevin Hilman <[email protected]>Cc Paul Walmsley <[email protected]>Reported-by Paul Walmsley <[email protected]>Signed-off-by Nishanth Menon <[email protected]>--- arch/arm/mach-omap2/pm.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 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 */ +#ifdef CONFIG_PM extern void omap3_pm_init_opp_table (void ); +#else +static inline void omap3_pm_init_opp_table (void ) +{ +} +#endif
Quoted 6 lines
arch/arm/mach-omap2/pm.h static inline void omap3_pm_init_vc(struct prm_setup_vc *setup_vc) · line 81
Quoted 2 lines
arch/arm/mach-omap2/pm.h +0
-0extern int omap3_pm_get_suspend_state (struct powerdomain *pwrdm);extern int omap3_pm_set_suspend_state (struct powerdomain *pwrdm,int state);This patch IMHO just solves the build issue. The runtime behaviour is a nasty crash. OMAP architecture has tied
CONFIG_PMwithCONFIG_CPU_FREQ. So I think we need a fix that solves the runtime behavior too.
What I meant to say is that CONFIG_PM & CONFIG_CPU_FREQ are independent. So this is not correct.
Dasgupta, Romit had written, on 01/15/2010 07:23 AM, the following:
Quoted 29 lines
Quoted 28 lines · Nishanth Menon
omap3_pm_init_opp_tableshould be under #ifdefCONFIG_PMelse build fails when PM is disabled. Reported by Paul originally.Cc Kevin Hilman <[email protected]>Cc Paul Walmsley <[email protected]>Reported-by Paul Walmsley <[email protected]>Signed-off-by Nishanth Menon <[email protected]>--- arch/arm/mach-omap2/pm.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 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 */ +#ifdef CONFIG_PM extern void omap3_pm_init_opp_table (void ); +#else +static inline void omap3_pm_init_opp_table (void ) +{ +} +#endif
Quoted 6 lines
arch/arm/mach-omap2/pm.h static inline void omap3_pm_init_vc(struct prm_setup_vc *setup_vc) · line 81
Quoted 2 lines
arch/arm/mach-omap2/pm.h +0
-0extern int omap3_pm_get_suspend_state (struct powerdomain *pwrdm);extern int omap3_pm_set_suspend_state (struct powerdomain *pwrdm,int state);This patch IMHO just solves the build issue. The runtime behaviour is a nasty crash. OMAP architecture has tied
CONFIG_PMwithCONFIG_CPU_FREQ. So I think we need a fix that solves the runtime behavior too.
hmm.. thanks for pointing it out (dropping the patch) - even though that was not the reason for this patch - I had send this patch after booting the kernel using omap3_pm_defconfig (disable PM) on SDP3630:
SDP3630: http://pastebin.mozilla.org/697292 - complete boot
SDP3430: http://pastebin.mozilla.org/697294 - hang
Signature · 2 lines
Regards, Nishanth Menon
Quoted 20 lines
Quoted 15 lines
Quoted 15 lines
index d257225..5fc056f 100644
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 */ +#ifdef CONFIG_PM extern void omap3_pm_init_opp_table (void ); +#else +static inline void omap3_pm_init_opp_table (void ) +{ +} +#endif Quoted 5 lines
arch/arm/mach-omap2/pm.h static inline void omap3_pm_init_vc(struct prm_setup_vc *setup_vc) · line 81
Quoted 2 lines
arch/arm/mach-omap2/pm.h +0
-0extern int omap3_pm_get_suspend_state (struct powerdomain *pwrdm);extern int omap3_pm_set_suspend_state (struct powerdomain *pwrdm,int state);This patch IMHO just solves the build issue. The runtime behaviour is a nasty crash. OMAP architecture has tied
CONFIG_PMwithCONFIG_CPU_FREQ. So I think we need a fix that solves the runtime behavior too.
Quoted 5 lines
hmm.. thanks for pointing it out (dropping the patch) - even though that was not the reason for this patch - I had send this patch after booting the kernel using
omap3_pm_defconfig(disable PM) on SDP3630:
SDP3630: http://pastebin.mozilla.org/697292 - complete boot
SDP3430: http://pastebin.mozilla.org/697294 - hang
As I mentioned there is a __fundamental__ problem in OMAP3 PM tree today. CONFIG_CPU_FREQ, CONFIG_CPU_IDLE are made dependent on CONFIG_PM. You can have cpufreq, cpuidle without suspend resume. So IMHO making these features independent is the right fix.