OMAP3: PM: Fix compilation issue of omap3_pm_init_opp_table
PATCH 1/1 OMAP3: PM: Fix compilation issue of omap3_pm_init_opp_table
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.
--- 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.5.7.g9ecb2
Eduardo Valentin said the following on 01/19/2010 05:57 AM:
Quoted 20 lines
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.Signed-off-by Eduardo Valentin <[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);
Err... NAK.. I think you missed http://marc.info/?t=126356119700001&r=1&w=2 ? there seems to be an issue else where, I have not dug at it yet.. Regards,
Nishanth Menon
Quoted 28 lines · ext Nishanth Menon
Eduardo Valentin said the following on 01/19/2010 05:57 AM:
Quoted 27 lines
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.Signed-off-by Eduardo Valentin <[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 3 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);Err... NAK.. I think you missed
http://marc.info/?t=126356119700001&r=1&w=2 ?
there seems to be an issue else where, I have not dug at it yet..
Yeah. OK, I couldn't see the logs as the dumps has been removed already from that thread. But if I got the problem correctly, the problem is when CONFIG_PM is not set but cpu freq is. And if there is any call to new omap opp layer helper functions, then it will BUG the system. Causing hangs.
I guess one way to solve this is to bind compilation of omap opp layer to CONFIG_PM and CONFIG_CPU_FREQ. If either is disabled, then omap opp layer must be nops.
What do you think?
I am sending a patch to do the above.
Quoted 2 lines
Regards,
Nishanth Menon
Signature · 1 line
Eduardo Valentin
Quoted 11 lines
Quoted 4 lines
Quoted 1 line
Err... NAK.. I think you missed
http://marc.info/?t=126356119700001&r=1&w=2 ?
there seems to be an issue else where, I have not dug at it yet..Yeah. OK, I couldn't see the logs as the dumps has been removed already from that thread. But if I got the problem correctly, the problem is when
CONFIG_PMis not set but cpu freq is. And if there is any call to new omap opp layer helper functions, then it will BUG the system. Causing hangs.
Quoted 6 lines
I guess one way to solve this is to bind compilation of omap opp layer to
CONFIG_PMandCONFIG_CPU_FREQ. If either is disabled, then omap opp layer must be nops.What do you think?
I am sending a patch to do the above.
No. That is incorrect. CONFIG_CPU_FREQ, CONFIG_CPU_IDLE and CONFIG_PM are independent. None of the features should be dependent on the other two! -Romit
Romit Dasgupta had written, on 01/19/2010 08:09 AM, the following:
Quoted 12 lines
Quoted 12 lines
Quoted 3 lines
Quoted 1 line
Err... NAK.. I think you missed http://marc.info/?t=126356119700001&r=1&w=2 ? there seems to be an issue else where, I have not dug at it yet..
Yeah. OK, I couldn't see the logs as the dumps has been removed already from that thread. But if I got the problem correctly, the problem is when
CONFIG_PMis not set but cpu freq is. And if there is any call to new omap opp layer helper functions, then it will BUG the system. Causing hangs.I guess one way to solve this is to bind compilation of omap opp layer to
CONFIG_PMandCONFIG_CPU_FREQ. If either is disabled, then omap opp layer must be nops.
Quoted 6 lines
Quoted 3 lines
What do you think?
I am sending a patch to do the above.
No. That is incorrect.
CONFIG_CPU_FREQ,CONFIG_CPU_IDLEandCONFIG_PMare independent. None of the features should be dependent on the other two! -Romit
OPP layer is required by CPU_FREQ & CONFIG_PM, not CPU_IDLE.
if we modify Eduardo's patch from:
if defined(CONFIG_PM) && defined(CONFIG_CPU_FREQ)
To
if defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ)
wont that ensure the independence is maintained for OPP layer? then, probably pm34xx.c maynot be the right place for opp registration for 3430 opps, and we should move it to opp34xx.c(I hate having new files :( )..
Signature · 2 lines
Regards, Nishanth Menon
Quoted 23 lines · Nishanth
Romit Dasgupta had written, on 01/19/2010 08:09 AM, the following:
Quoted 12 lines
Quoted 12 lines
Quoted 4 lines
Quoted 1 line
Err... NAK.. I think you missed
http://marc.info/?t=126356119700001&r=1&w=2 ?
there seems to be an issue else where, I have not dug at it yet..Yeah. OK, I couldn't see the logs as the dumps has been removed already from that thread. But if I got the problem correctly, the problem is when
CONFIG_PMis not set but cpu freq is. And if there is any call to new omap opp layer helper functions, then it will BUG the system. Causing hangs.I guess one way to solve this is to bind compilation of omap opp layer to
CONFIG_PMandCONFIG_CPU_FREQ. If either is disabled, then omap opp layer must be nops.Quoted 6 lines
Quoted 3 lines
What do you think?
I am sending a patch to do the above.
No. That is incorrect.
CONFIG_CPU_FREQ,CONFIG_CPU_IDLEandCONFIG_PMare independent. None of the features should be dependent on the other two! -RomitOPP layer is required by
CPU_FREQ&CONFIG_PM, notCPU_IDLE.if we modify Eduardo's patch from:
Quoted 9 lines
if
defined(CONFIG_PM)&&defined(CONFIG_CPU_FREQ)
Toif
defined(CONFIG_PM)||defined(CONFIG_CPU_FREQ)wont that ensure the independence is maintained for OPP layer? then, probably
pm34xx.cmaynot be the right place for opp registration for 3430 opps, and we should move it to opp34xx.c(I hate having new files :( )..
It should be only
#ifdef CONFIG_CPU_FREQ. OPP has nothing to do with CONFIG_PM.
Why do you need CPU_FREQ for suspend/resume??
Dasgupta, Romit had written, on 01/19/2010 08:41 AM, the following:
Quoted 26 lines
Quoted 25 lines · Nishanth
Romit Dasgupta had written, on 01/19/2010 08:09 AM, the following:
Quoted 11 lines
Quoted 11 lines
Quoted 3 lines
Quoted 1 line
Err... NAK.. I think you missed http://marc.info/?t=126356119700001&r=1&w=2 ? there seems to be an issue else where, I have not dug at it yet..
Yeah. OK, I couldn't see the logs as the dumps has been removed already from that thread. But if I got the problem correctly, the problem is when
CONFIG_PMis not set but cpu freq is. And if there is any call to new omap opp layer helper functions, then it will BUG the system. Causing hangs.I guess one way to solve this is to bind compilation of omap opp layer to
CONFIG_PMandCONFIG_CPU_FREQ. If either is disabled, then omap opp layer must be nops.Quoted 6 lines
Quoted 3 lines
What do you think?
I am sending a patch to do the above.
No. That is incorrect.
CONFIG_CPU_FREQ,CONFIG_CPU_IDLEandCONFIG_PMare independent. None of the features should be dependent on the other two! -RomitOPP layer is required by
CPU_FREQ&CONFIG_PM, notCPU_IDLE.if we modify Eduardo's patch from:
if
defined(CONFIG_PM)&&defined(CONFIG_CPU_FREQ)
To
Quoted 9 lines
Quoted 4 lines
if
defined(CONFIG_PM)||defined(CONFIG_CPU_FREQ)wont that ensure the independence is maintained for OPP layer? then, probably
pm34xx.cmaynot be the right place for opp registration for 3430 opps, and we should move it to opp34xx.c(I hate having new files :( )..It should be only
#ifdefCONFIG_CPU_FREQ. OPP has nothing to do withCONFIG_PM.Why do you need
CPU_FREQfor suspend/resume??
voltage control - SR needs to query for voltage?
Signature · 2 lines
Regards, Nishanth Menon
Quoted 9 lines
Quoted 7 lines
3430 opps, and we should move it to opp34xx.c(I hate having new files :( )..
Quoted 1 line
It should be only
#ifdefCONFIG_CPU_FREQ. OPP has nothing to do withCONFIG_PM.Why do you need
CPU_FREQfor suspend/resume??voltage control - SR needs to query for voltage?
Why should suspend/resume be dependent on SR?
Dasgupta, Romit had written, on 01/19/2010 08:43 AM, the following:
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
3430 opps, and we should move it to opp34xx.c(I hate having new files :( ).. It should be only
#ifdefCONFIG_CPU_FREQ. OPP has nothing to do withCONFIG_PM.Why do you need
CPU_FREQfor suspend/resume??voltage control - SR needs to query for voltage?
Why should suspend/resume be dependent on SR?
please see the code logic -> when SR is enabled and OFF/RET happens, you need the voltage for the current frequency so that you can disable SR, set the nominal voltage for the current OPP then go to WFI.
Signature · 2 lines
Regards, Nishanth Menon
Quoted 5 lines · Nishanth
Dasgupta, Romit had written, on 01/19/2010 08:43 AM, the following:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
3430 opps, and we should move it to opp34xx.c(I hate having new files :( ).. It should be only
#ifdefCONFIG_CPU_FREQ. OPP has nothing to do withCONFIG_PM.
Quoted 9 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
Why do you need
CPU_FREQfor suspend/resume??voltage control - SR needs to query for voltage?
Why should suspend/resume be dependent on SR?
please see the code logic -> when SR is enabled and OFF/RET happens, you need the voltage for the current frequency so that you can disable SR, set the nominal voltage for the current OPP then go to WFI.
You do not need the OPP table for querying voltage alone. You can read that from the OMAP chip registers directly. So OPP layer is not necessary when we do not use cpufreq!
Dasgupta, Romit had written, on 01/19/2010 08:50 AM, the following:
Quoted 8 lines
Quoted 7 lines · Nishanth
Dasgupta, Romit had written, on 01/19/2010 08:43 AM, the following:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
3430 opps, and we should move it to opp34xx.c(I hate having new files :( ).. It should be only
#ifdefCONFIG_CPU_FREQ. OPP has nothing to do withCONFIG_PM.Why do you need
CPU_FREQfor suspend/resume??
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
voltage control - SR needs to query for voltage?
Why should suspend/resume be dependent on SR?
please see the code logic -> when SR is enabled and OFF/RET happens, you need the voltage for the current frequency so that you can disable SR, set the nominal voltage for the current OPP then go to WFI.
You do not need the OPP table for querying voltage alone. You can read that from the OMAP chip registers directly. So OPP layer is not necessary when we do not use cpufreq!
there are multiple ways to use SR -> Not all of them can use OMAP chip registers. certain class of devices would need to use PMICs, further SRF or it's equivalent will need to query the table for knowing what voltage corresponds to frequency, DSPBRidge needs to report to the baseimage what voltage corresponds to the frequency for the baseimage's load balancing/power decision logic etc.. in short when dynamic voltage scaling is needed, we need OPP layer a.k.a CONFIG_PM needs opp layer - not just cpufreq.
Signature · 2 lines
Regards, Nishanth Menon
________________________________________
Quoted 2 lines
there are multiple ways to use SR -> Not all of them can use OMAP chip registers. certain class of devices would need to use PMICs,
Even then you do not need OPP layer. For PMIC based solutions you need to use I2C to get the voltage. So this should be abstracted. OPP layer is just for CPU FREQ.
Quoted 3 lines
further SRF
or it's equivalent will need to query the table for knowing what voltage corresponds to frequency,
Why should you know the voltage for a frequency other than your current frequency when you do not scale the frequency of your CPU? Clock framework will give you the current freq. For voltage, we already discussed above.
Quoted 5 lines
DSPBRidge needs to report to the baseimage
what voltage corresponds to the frequency for the baseimage's load balancing/power decision logic etc.. in short when dynamic voltage scaling is needed, we need OPP layer a.k.aCONFIG_PMneeds opp layer - not just cpufreq.
Please understand CONFIG_PM is not for any kind of __cpufreq or dspfreq__. It is for suspend resume and few other stuff. So why should CONFIG_PM need OPP layer?
--
Regards,
Nishanth Menon
Hi Romit,
Quoted 13 lines
From: [email protected] [mailto:linux-omap-
Quoted 2 lines · Nishanth
Dasgupta, Romit had written, on 01/19/2010 08:43 AM, the following:
Quoted 1 line
Quoted 1 line
Quoted 1 line
3430 opps, and we should move it to opp34xx.c(I hate having new
files :( )..
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
It should be only
#ifdefCONFIG_CPU_FREQ. OPP has nothing to do withCONFIG_PM.Why do you need
CPU_FREQfor suspend/resume??voltage control - SR needs to query for voltage?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Why should suspend/resume be dependent on SR?
please see the code logic -> when SR is enabled and OFF/RET happens, you need the voltage for the current frequency so that you can disable SR, set the nominal voltage for the current OPP then go to WFI.
You do not need the OPP table for querying voltage alone. You can read that from the OMAP chip registers directly. So OPP layer is not necessary when we do not use cpufreq!
I do agree that we should not need CPUfreq, but cannot use the voltage from the VP either; you need to set the nominal voltage to be safe not the one after SR correction. Eventually it will have to be handled by the SR layer.
Regards,
Benoit
Texas Instruments France SA, 821 Avenue Jack Kilby, 06270 Villeneuve Loubet. 036 420 040 R.C.S Antibes. Capital de EUR 753.920
Hello Benoit,
Quoted 6 lines
Quoted 3 lines
You do not need the OPP table for querying voltage alone. You can read that from the OMAP chip registers directly. So OPP layer is not necessary when we do not use cpufreq!
I do agree that we should not need CPUfreq, but cannot use the voltage from the VP either; you need to set >the nominal voltage to be safe not the one after SR correction. Eventually it will have to be handled by the SR layer.
Yes it can be handled by SR layer but this does not need one to query OPP. All you need is to know current freq and voltage. This can and should be done without taking help of OPP layer (when CONFIG_CPU_FREQ is absent).
Thanks,
-Romit