Fix pm24xx.c compilation problem
arch/arm/mach-omap2/pm24xx.c doesn't compile without CONFIG_SUSPEND
arch/arm/mach-omap2/pm24xx.c +3 -2
@@ -53,8 +53,8 @@#include <plat/powerdomain.h> #include <plat/clockdomain.h> -#ifdef CONFIG_SUSPEND static suspend_state_t suspend_state =PM_SUSPEND_ON ; +#ifdef CONFIG_SUSPEND static inline bool is_suspending (void ) {return (suspend_state !=PM_SUSPEND_ON );
@@ -314,6 +314,7 @@ static int omap2_pm_prepare(void)static int omap2_pm_suspend (void ) { +#ifdef CONFIG_SUSPEND u32 wken_wkup, mir1; wken_wkup =prm_read_mod_reg (WKUP_MOD ,PM_WKEN );
@@ -329,7 +330,7 @@ static int omap2_pm_suspend(void)omap_writel (mir1,0x480fe0a4 );prm_write_mod_reg (wken_wkup,WKUP_MOD ,PM_WKEN ); - +#endif return 0 ; }
Quoted 25 lines · Charles Manning
arch/arm/mach-omap2/pm24xx.cdoesn't compile withoutCONFIG_SUSPENDarch/arm/mach-omap2/pm24xx.c +2
-1@@ -53,8 +53,8 @@#include <plat/powerdomain.h> #include <plat/clockdomain.h> -#ifdef CONFIG_SUSPEND static suspend_state_t suspend_state =PM_SUSPEND_ON ; +#ifdef CONFIG_SUSPEND static inline bool is_suspending (void ) {return (suspend_state !=PM_SUSPEND_ON );@@ -314,6 +314,7 @@ static int omap2_pm_prepare(void)static int omap2_pm_suspend (void ) { +#ifdef CONFIG_SUSPEND u32 wken_wkup, mir1; wken_wkup =prm_read_mod_reg (WKUP_MOD ,PM_WKEN );
arch/arm/mach-omap2/pm24xx.c static int omap2_pm_suspend(void) · line 335
Quoted 7 lines
arch/arm/mach-omap2/pm24xx.c +1
-1@@ -329,7 +330,7 @@ static int omap2_pm_suspend(void)omap_writel (mir1,0x480fe0a4 );prm_write_mod_reg (wken_wkup,WKUP_MOD ,PM_WKEN ); - +#endif return 0 ; }
Indeed a bug, but not quite the right fix.
Like we do on OMAP3, all of the _begin, _enter, _suspend, and _end fucntions can actually be left out when !CONFIG_SUSPEND.
Will send patch shortly.
Thanks for reporting this and proposing a fix.
Kevin
Quoted 36 lines · On Thursday 23 December 2010 11:22:42 Kevin Hilman wrote:
Quoted 25 lines · Charles Manning
arch/arm/mach-omap2/pm24xx.cdoesn't compile withoutCONFIG_SUSPENDarch/arm/mach-omap2/pm24xx.c +2
-1@@ -53,8 +53,8 @@#include <plat/powerdomain.h> #include <plat/clockdomain.h> -#ifdef CONFIG_SUSPEND static suspend_state_t suspend_state =PM_SUSPEND_ON ; +#ifdef CONFIG_SUSPEND static inline bool is_suspending (void ) {return (suspend_state !=PM_SUSPEND_ON );@@ -314,6 +314,7 @@ static int omap2_pm_prepare(void)static int omap2_pm_suspend (void ) { +#ifdef CONFIG_SUSPEND u32 wken_wkup, mir1; wken_wkup =prm_read_mod_reg (WKUP_MOD ,PM_WKEN );arch/arm/mach-omap2/pm24xx.c static int omap2_pm_suspend(void) · line 335
Quoted 7 lines
arch/arm/mach-omap2/pm24xx.c +1
-1@@ -329,7 +330,7 @@ static int omap2_pm_suspend(void)omap_writel (mir1,0x480fe0a4 );prm_write_mod_reg (wken_wkup,WKUP_MOD ,PM_WKEN ); - +#endif return 0 ; }Indeed a bug, but not quite the right fix.
Quoted 6 lines
Like we do on OMAP3, all of the
_begin,_enter,_suspend, and_endfucntions can actually be left out when !CONFIG_SUSPEND.Will send patch shortly.
Thanks for reporting this and proposing a fix.
I should have been clearer. I did not really propose this as a fix. I really just as a way to get over the compilation hump and alert someone who can fix it properly.
Thanks
-- Charles