public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PM-WIP-OPP][PATCH] pm: omap3: fix build error for PM disabled
@ 2010-01-15 13:13 Nishanth Menon
  2010-01-15 13:23 ` Romit Dasgupta
  0 siblings, 1 reply; 5+ messages in thread
From: Nishanth Menon @ 2010-01-15 13:13 UTC (permalink / raw)
  To: linux-omap; +Cc: Nishanth Menon, Kevin Hilman, Paul Walmsley

omap3_pm_init_opp_table should be under #ifdef CONFIG_PM
else build fails when PM is disabled. Reported by Paul originally.

Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Paul Walmsley <paul@pwsan.com>
Reported-by: Paul Walmsley <paul@pwsan.com>

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/pm.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index d257225..5fc056f 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -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);
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PM-WIP-OPP][PATCH] pm: omap3: fix build error for PM disabled
  2010-01-15 13:13 [PM-WIP-OPP][PATCH] pm: omap3: fix build error for PM disabled Nishanth Menon
@ 2010-01-15 13:23 ` Romit Dasgupta
  2010-01-15 13:27   ` Romit Dasgupta
  2010-01-15 13:32   ` Nishanth Menon
  0 siblings, 2 replies; 5+ messages in thread
From: Romit Dasgupta @ 2010-01-15 13:23 UTC (permalink / raw)
  To: Nishanth Menon; +Cc: linux-omap, Kevin Hilman, Paul Walmsley

Nishanth Menon wrote:
> omap3_pm_init_opp_table should be under #ifdef CONFIG_PM
> else build fails when PM is disabled. Reported by Paul originally.
> 
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Reported-by: Paul Walmsley <paul@pwsan.com>
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>  arch/arm/mach-omap2/pm.h |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
> index d257225..5fc056f 100644
> --- a/arch/arm/mach-omap2/pm.h
> +++ b/arch/arm/mach-omap2/pm.h
> @@ -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);

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PM-WIP-OPP][PATCH] pm: omap3: fix build error for PM disabled
  2010-01-15 13:23 ` Romit Dasgupta
@ 2010-01-15 13:27   ` Romit Dasgupta
  2010-01-15 13:32   ` Nishanth Menon
  1 sibling, 0 replies; 5+ messages in thread
From: Romit Dasgupta @ 2010-01-15 13:27 UTC (permalink / raw)
  To: Menon, Nishanth; +Cc: linux-omap, Kevin Hilman, Paul Walmsley

Romit Dasgupta wrote:
> Nishanth Menon wrote:
>> omap3_pm_init_opp_table should be under #ifdef CONFIG_PM
>> else build fails when PM is disabled. Reported by Paul originally.
>>
>> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>> Cc: Paul Walmsley <paul@pwsan.com>
>> Reported-by: Paul Walmsley <paul@pwsan.com>
>>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>> ---
>>  arch/arm/mach-omap2/pm.h |    6 ++++++
>>  1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
>> index d257225..5fc056f 100644
>> --- a/arch/arm/mach-omap2/pm.h
>> +++ b/arch/arm/mach-omap2/pm.h
>> @@ -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);
> 
> 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.
What I meant to say is that CONFIG_PM & CONFIG_CPU_FREQ are independent. So this
is not correct.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PM-WIP-OPP][PATCH] pm: omap3: fix build error for PM disabled
  2010-01-15 13:23 ` Romit Dasgupta
  2010-01-15 13:27   ` Romit Dasgupta
@ 2010-01-15 13:32   ` Nishanth Menon
  2010-01-18  5:57     ` Romit Dasgupta
  1 sibling, 1 reply; 5+ messages in thread
From: Nishanth Menon @ 2010-01-15 13:32 UTC (permalink / raw)
  To: Dasgupta, Romit; +Cc: linux-omap, Kevin Hilman, Paul Walmsley

Dasgupta, Romit had written, on 01/15/2010 07:23 AM, the following:
> Nishanth Menon wrote:
>> omap3_pm_init_opp_table should be under #ifdef CONFIG_PM
>> else build fails when PM is disabled. Reported by Paul originally.
>>
>> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>> Cc: Paul Walmsley <paul@pwsan.com>
>> Reported-by: Paul Walmsley <paul@pwsan.com>
>>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>> ---
>>  arch/arm/mach-omap2/pm.h |    6 ++++++
>>  1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
>> index d257225..5fc056f 100644
>> --- a/arch/arm/mach-omap2/pm.h
>> +++ b/arch/arm/mach-omap2/pm.h
>> @@ -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);
> 
> 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.
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

-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PM-WIP-OPP][PATCH] pm: omap3: fix build error for PM disabled
  2010-01-15 13:32   ` Nishanth Menon
@ 2010-01-18  5:57     ` Romit Dasgupta
  0 siblings, 0 replies; 5+ messages in thread
From: Romit Dasgupta @ 2010-01-18  5:57 UTC (permalink / raw)
  To: Menon, Nishanth; +Cc: linux-omap, Kevin Hilman, Paul Walmsley

>>> index d257225..5fc056f 100644
>>> --- a/arch/arm/mach-omap2/pm.h
>>> +++ b/arch/arm/mach-omap2/pm.h
>>> @@ -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);
>> 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.
> 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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-01-18  5:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15 13:13 [PM-WIP-OPP][PATCH] pm: omap3: fix build error for PM disabled Nishanth Menon
2010-01-15 13:23 ` Romit Dasgupta
2010-01-15 13:27   ` Romit Dasgupta
2010-01-15 13:32   ` Nishanth Menon
2010-01-18  5:57     ` Romit Dasgupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox