Re: [PATCH 03/10 V3] omap3: pm: use opp accessor functions for omap34xx

2009-12-08 Thread Eduardo Valentin
Hello Nishanth,

Same comments from patch 09/10 applies here. Copying those to make like easier:

On Wed, Nov 25, 2009 at 05:09:12AM +0100, ext Nishanth Menon wrote:
 Move the definitions from omap3-opp.h to pm34xx.c. The definitions
 are now based on omap_opp_def instead of omap_opp itself.
 Since the opp.h has the omap_opp definition, omap-pm.h conflicts and
 has been removed in favor of opp.h.
 
 omap3_pm_init_opp_table is used to initialize the OPP table and
 relevant board files which have omap2_init_common_hw called with opp
 arrays have been updated with omap3_pm_init_opp_table.
 
 This change now allows us to dynamically register OPPs to the system
 based on silicon type we detect.
 
 NOTE: This introduces the following warnings highlighting areas we
 need to cleanup:
 arch/arm/mach-omap2/smartreflex.c: In function 'get_opp':
 arch/arm/mach-omap2/smartreflex.c:161: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/smartreflex.c:164: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/smartreflex.c:166: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/smartreflex.c:168: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c: In function 'get_opp':
 arch/arm/mach-omap2/resource34xx.c:165: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:168: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:170: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:172: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c: In function 'program_opp':
 arch/arm/mach-omap2/resource34xx.c:284: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:285: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 Signed-off-by: Nishanth Menon n...@ti.com
 ---
  arch/arm/mach-omap2/board-3430sdp.c   |1 +
  arch/arm/mach-omap2/board-omap3beagle.c   |1 +
  arch/arm/mach-omap2/board-omap3evm.c  |1 +
  arch/arm/mach-omap2/board-rx51.c  |1 +
  arch/arm/mach-omap2/board-zoom2.c |2 +
  arch/arm/mach-omap2/omap3-opp.h   |   58 +---
  arch/arm/mach-omap2/pm.h  |6 +++
  arch/arm/mach-omap2/pm34xx.c  |   68 
 +
  arch/arm/plat-omap/include/plat/omap-pm.h |   17 +---
  9 files changed, 84 insertions(+), 71 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
 b/arch/arm/mach-omap2/board-3430sdp.c
 index eac529f..0ec8327 100644
 --- a/arch/arm/mach-omap2/board-3430sdp.c
 +++ b/arch/arm/mach-omap2/board-3430sdp.c
 @@ -220,6 +220,7 @@ static void __init omap_3430sdp_init_irq(void)
  {
 omap_board_config = sdp3430_config;
 omap_board_config_size = ARRAY_SIZE(sdp3430_config);
 +   omap3_pm_init_opp_table();
 omap3_pm_init_vc(omap3_setuptime_table);
 omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
 omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL, 
 omap3_mpu_rate_table,
 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
 b/arch/arm/mach-omap2/board-omap3beagle.c
 index 2ec3520..a937238 100644
 --- a/arch/arm/mach-omap2/board-omap3beagle.c
 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
 @@ -361,6 +361,7 @@ static void __init omap3_beagle_init_irq(void)
  {
 omap_board_config = omap3_beagle_config;
 omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
 +   omap3_pm_init_opp_table();
 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
  mt46h32m32lf6_sdrc_params, omap3_mpu_rate_table,
  omap3_dsp_rate_table, omap3_l3_rate_table);
 diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
 b/arch/arm/mach-omap2/board-omap3evm.c
 index 8130eca..44a5861 100644
 --- a/arch/arm/mach-omap2/board-omap3evm.c
 +++ b/arch/arm/mach-omap2/board-omap3evm.c
 @@ -404,6 +404,7 @@ static void __init omap3_evm_init_irq(void)
  {
 omap_board_config = omap3_evm_config;
 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
 +   omap3_pm_init_opp_table();
 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL, 
 omap3_mpu_rate_table,
  omap3_dsp_rate_table, omap3_l3_rate_table);
 omap_init_irq();
 diff --git a/arch/arm/mach-omap2/board-rx51.c 
 b/arch/arm/mach-omap2/board-rx51.c
 index 2f1c2be..997fd1c 100644
 --- a/arch/arm/mach-omap2/board-rx51.c
 +++ b/arch/arm/mach-omap2/board-rx51.c
 

Re: [PATCH 03/10 V3] omap3: pm: use opp accessor functions for omap34xx

2009-12-08 Thread Menon, Nishanth
tero.kri...@nokia.com said the following on 12/07/2009 11:02 AM:
 One additional comment to this patch, compilation of board-rx51.c fails 
 unless #include pm.h is added to it. This might be true for other boards 
 also seeing it has been added to zoom2 at least.
   
Huh.. Weird, I did build and test with omap3_pm_defconfig - rx51 should
have been part of the build.. will check also next time..
   
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of ext Kevin Hilman
 Sent: 25 November, 2009 19:22
 To: Nishanth Menon
 Cc: linux-omap
 Subject: Re: [PATCH 03/10 V3] omap3: pm: use opp accessor
 functions for omap34xx

 Nishanth Menon n...@ti.com writes:

 
 Move the definitions from omap3-opp.h to pm34xx.c. The definitions
 are now based on omap_opp_def instead of omap_opp itself.
 Since the opp.h has the omap_opp definition, omap-pm.h conflicts and
 has been removed in favor of opp.h.
   
 ok

 
 omap3_pm_init_opp_table is used to initialize the OPP table and
 relevant board files which have omap2_init_common_hw called with opp
 arrays have been updated with omap3_pm_init_opp_table.

 This change now allows us to dynamically register OPPs to the system
 based on silicon type we detect.
   
 Nice.

 With this patch, I would suggest a couple more cleanups in how
 we are handling
 the master OPP lists for MPU, DSP and L3.

 Namely, It's time we could remove the rate_table passing from the OMAP
 PM layer all together and just keep them as pointers in opp.h.

 The longer term goal is to remove OPP handling from OMAP PM
 all together,
 so this will be a step in that direction.

 I've attached a patch that applies on top of your series that drops
 the OPPs from OMAP PM layer.  After doing this, we now have some
 duplicate global pointers to the various rate tables that could be
 cleaned up.  In addition, all the rate tables could be dropped from
 init_common_hw.

 If you follow my proposal for using opp_add() instead of opp_init()
 the board files that want to just use default OPPs do not have to do
 anyting with the rate tables.  Only board files wanting to add OPPs
 would have to include opp.h and use opp_add().

 Also, dropping the rate tables from init_common_hw would mean you
 shouldn't have init sequence issues anymore and you can do the OPP
 init inside existing PM init.

 Kevin

 
 NOTE: This introduces the following warnings highlighting areas we
 need to cleanup:
 arch/arm/mach-omap2/smartreflex.c: In function 'get_opp':
 arch/arm/mach-omap2/smartreflex.c:161: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 arch/arm/mach-omap2/smartreflex.c:164: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 arch/arm/mach-omap2/smartreflex.c:166: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 arch/arm/mach-omap2/smartreflex.c:168: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 arch/arm/mach-omap2/resource34xx.c: In function 'get_opp':
 arch/arm/mach-omap2/resource34xx.c:165: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 arch/arm/mach-omap2/resource34xx.c:168: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 arch/arm/mach-omap2/resource34xx.c:170: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 arch/arm/mach-omap2/resource34xx.c:172: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 arch/arm/mach-omap2/resource34xx.c: In function 'program_opp':
 arch/arm/mach-omap2/resource34xx.c:284: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 arch/arm/mach-omap2/resource34xx.c:285: warning: 'opp_id' is
   
 deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 
 Signed-off-by: Nishanth Menon n...@ti.com
 ---
  arch/arm/mach-omap2/board-3430sdp.c   |1 +
  arch/arm/mach-omap2/board-omap3beagle.c   |1 +
  arch/arm/mach-omap2/board-omap3evm.c  |1 +
  arch/arm/mach-omap2/board-rx51.c  |1 +
  arch/arm/mach-omap2/board-zoom2.c |2 +
  arch/arm/mach-omap2/omap3-opp.h   |   58
   
 +---
 
  arch/arm/mach-omap2/pm.h  |6 +++
  arch/arm/mach-omap2/pm34xx.c  |   68
   
 +
 
  arch/arm/plat-omap/include/plat/omap-pm.h |   17 +---
  9 files changed, 84 insertions(+), 71 deletions(-)

 diff --git a/arch/arm/mach-omap2/board-3430sdp.c
   
 b/arch/arm/mach-omap2/board-3430sdp.c
 
 index eac529f..0ec8327 100644
 --- a/arch/arm/mach-omap2/board-3430sdp.c
 +++ b/arch/arm/mach-omap2/board-3430sdp.c

RE: [PATCH 03/10 V3] omap3: pm: use opp accessor functions for omap34xx

2009-12-07 Thread Tero.Kristo
One additional comment to this patch, compilation of board-rx51.c fails unless 
#include pm.h is added to it. This might be true for other boards also seeing 
it has been added to zoom2 at least.

-Original Message-
From: linux-omap-ow...@vger.kernel.org
[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of ext Kevin Hilman
Sent: 25 November, 2009 19:22
To: Nishanth Menon
Cc: linux-omap
Subject: Re: [PATCH 03/10 V3] omap3: pm: use opp accessor
functions for omap34xx

Nishanth Menon n...@ti.com writes:

 Move the definitions from omap3-opp.h to pm34xx.c. The definitions
 are now based on omap_opp_def instead of omap_opp itself.
 Since the opp.h has the omap_opp definition, omap-pm.h conflicts and
 has been removed in favor of opp.h.

ok

 omap3_pm_init_opp_table is used to initialize the OPP table and
 relevant board files which have omap2_init_common_hw called with opp
 arrays have been updated with omap3_pm_init_opp_table.

 This change now allows us to dynamically register OPPs to the system
 based on silicon type we detect.

Nice.

With this patch, I would suggest a couple more cleanups in how
we are handling
the master OPP lists for MPU, DSP and L3.

Namely, It's time we could remove the rate_table passing from the OMAP
PM layer all together and just keep them as pointers in opp.h.

The longer term goal is to remove OPP handling from OMAP PM
all together,
so this will be a step in that direction.

I've attached a patch that applies on top of your series that drops
the OPPs from OMAP PM layer.  After doing this, we now have some
duplicate global pointers to the various rate tables that could be
cleaned up.  In addition, all the rate tables could be dropped from
init_common_hw.

If you follow my proposal for using opp_add() instead of opp_init()
the board files that want to just use default OPPs do not have to do
anyting with the rate tables.  Only board files wanting to add OPPs
would have to include opp.h and use opp_add().

Also, dropping the rate tables from init_common_hw would mean you
shouldn't have init sequence issues anymore and you can do the OPP
init inside existing PM init.

Kevin

 NOTE: This introduces the following warnings highlighting areas we
 need to cleanup:
 arch/arm/mach-omap2/smartreflex.c: In function 'get_opp':
 arch/arm/mach-omap2/smartreflex.c:161: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/smartreflex.c:164: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/smartreflex.c:166: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/smartreflex.c:168: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c: In function 'get_opp':
 arch/arm/mach-omap2/resource34xx.c:165: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:168: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:170: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:172: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c: In function 'program_opp':
 arch/arm/mach-omap2/resource34xx.c:284: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:285: warning: 'opp_id' is
deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33)

 Signed-off-by: Nishanth Menon n...@ti.com
 ---
  arch/arm/mach-omap2/board-3430sdp.c   |1 +
  arch/arm/mach-omap2/board-omap3beagle.c   |1 +
  arch/arm/mach-omap2/board-omap3evm.c  |1 +
  arch/arm/mach-omap2/board-rx51.c  |1 +
  arch/arm/mach-omap2/board-zoom2.c |2 +
  arch/arm/mach-omap2/omap3-opp.h   |   58
+---
  arch/arm/mach-omap2/pm.h  |6 +++
  arch/arm/mach-omap2/pm34xx.c  |   68
+
  arch/arm/plat-omap/include/plat/omap-pm.h |   17 +---
  9 files changed, 84 insertions(+), 71 deletions(-)

 diff --git a/arch/arm/mach-omap2/board-3430sdp.c
b/arch/arm/mach-omap2/board-3430sdp.c
 index eac529f..0ec8327 100644
 --- a/arch/arm/mach-omap2/board-3430sdp.c
 +++ b/arch/arm/mach-omap2/board-3430sdp.c
 @@ -220,6 +220,7 @@ static void __init omap_3430sdp_init_irq(void)
  {
  omap_board_config = sdp3430_config;
  omap_board_config_size = ARRAY_SIZE(sdp3430_config);
 +omap3_pm_init_opp_table();
  omap3_pm_init_vc(omap3_setuptime_table);
  omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
  omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL,
omap3_mpu_rate_table,
 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
b/arch/arm/mach

Re: [PATCH 03/10 V3] omap3: pm: use opp accessor functions for omap34xx

2009-11-25 Thread Kevin Hilman
Nishanth Menon n...@ti.com writes:

 Move the definitions from omap3-opp.h to pm34xx.c. The definitions
 are now based on omap_opp_def instead of omap_opp itself.
 Since the opp.h has the omap_opp definition, omap-pm.h conflicts and
 has been removed in favor of opp.h.

ok

 omap3_pm_init_opp_table is used to initialize the OPP table and
 relevant board files which have omap2_init_common_hw called with opp
 arrays have been updated with omap3_pm_init_opp_table.

 This change now allows us to dynamically register OPPs to the system
 based on silicon type we detect.

Nice.

With this patch, I would suggest a couple more cleanups in how we are handling
the master OPP lists for MPU, DSP and L3.

Namely, It's time we could remove the rate_table passing from the OMAP
PM layer all together and just keep them as pointers in opp.h.

The longer term goal is to remove OPP handling from OMAP PM all together,
so this will be a step in that direction.

I've attached a patch that applies on top of your series that drops
the OPPs from OMAP PM layer.  After doing this, we now have some
duplicate global pointers to the various rate tables that could be
cleaned up.  In addition, all the rate tables could be dropped from
init_common_hw.

If you follow my proposal for using opp_add() instead of opp_init()
the board files that want to just use default OPPs do not have to do
anyting with the rate tables.  Only board files wanting to add OPPs
would have to include opp.h and use opp_add().

Also, dropping the rate tables from init_common_hw would mean you
shouldn't have init sequence issues anymore and you can do the OPP
init inside existing PM init.

Kevin

 NOTE: This introduces the following warnings highlighting areas we
 need to cleanup:
 arch/arm/mach-omap2/smartreflex.c: In function 'get_opp':
 arch/arm/mach-omap2/smartreflex.c:161: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/smartreflex.c:164: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/smartreflex.c:166: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/smartreflex.c:168: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c: In function 'get_opp':
 arch/arm/mach-omap2/resource34xx.c:165: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:168: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:170: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:172: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c: In function 'program_opp':
 arch/arm/mach-omap2/resource34xx.c:284: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)
 arch/arm/mach-omap2/resource34xx.c:285: warning: 'opp_id' is deprecated 
 (declared at arch/arm/plat-omap/include/plat/opp.h:33)

 Signed-off-by: Nishanth Menon n...@ti.com
 ---
  arch/arm/mach-omap2/board-3430sdp.c   |1 +
  arch/arm/mach-omap2/board-omap3beagle.c   |1 +
  arch/arm/mach-omap2/board-omap3evm.c  |1 +
  arch/arm/mach-omap2/board-rx51.c  |1 +
  arch/arm/mach-omap2/board-zoom2.c |2 +
  arch/arm/mach-omap2/omap3-opp.h   |   58 +---
  arch/arm/mach-omap2/pm.h  |6 +++
  arch/arm/mach-omap2/pm34xx.c  |   68 
 +
  arch/arm/plat-omap/include/plat/omap-pm.h |   17 +---
  9 files changed, 84 insertions(+), 71 deletions(-)

 diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
 b/arch/arm/mach-omap2/board-3430sdp.c
 index eac529f..0ec8327 100644
 --- a/arch/arm/mach-omap2/board-3430sdp.c
 +++ b/arch/arm/mach-omap2/board-3430sdp.c
 @@ -220,6 +220,7 @@ static void __init omap_3430sdp_init_irq(void)
  {
   omap_board_config = sdp3430_config;
   omap_board_config_size = ARRAY_SIZE(sdp3430_config);
 + omap3_pm_init_opp_table();
   omap3_pm_init_vc(omap3_setuptime_table);
   omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
   omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL, 
 omap3_mpu_rate_table,
 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
 b/arch/arm/mach-omap2/board-omap3beagle.c
 index 2ec3520..a937238 100644
 --- a/arch/arm/mach-omap2/board-omap3beagle.c
 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
 @@ -361,6 +361,7 @@ static void __init omap3_beagle_init_irq(void)
  {
   omap_board_config = omap3_beagle_config;
   omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
 + omap3_pm_init_opp_table();
   omap2_init_common_hw(mt46h32m32lf6_sdrc_params,

Re: [PATCH 03/10 V3] omap3: pm: use opp accessor functions for omap34xx

2009-11-25 Thread Kevin Hilman
Kevin Hilman khil...@deeprootsystems.com writes:

[...]

 I've attached a patch that applies on top of your series 

Forgot the patch.  Here it is.

Kevin

commit 2979ad2ad596618e179f1292e6e7e37d55830096
Author: Kevin Hilman khil...@deeprootsystems.com
Date:   Wed Nov 25 09:12:17 2009 -0800

OMAP3: PM: remove OPP interfaces from OMAP PM layer

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 91bcfbf..e2f44ec 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -319,7 +319,7 @@ void __init omap2_init_common_hw(struct omap_sdrc_params 
*sdrc_cs0,
/* The OPP tables have to be registered before a clk init */
omap_hwmod_init(hwmods);
omap2_mux_init();
-   omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps);
+   omap_pm_if_early_init();
pwrdm_init(powerdomains_omap);
clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
omap2_clk_init();
diff --git a/arch/arm/mach-omap2/resource34xx.h 
b/arch/arm/mach-omap2/resource34xx.h
index b6f31a9..0b4e76e 100644
--- a/arch/arm/mach-omap2/resource34xx.h
+++ b/arch/arm/mach-omap2/resource34xx.h
@@ -27,7 +27,7 @@
 #include plat/powerdomain.h
 #include plat/resource.h
 #include plat/clock.h
-#include plat/omap-pm.h
+#include plat/opp.h
 #include plat/omap34xx.h
 
 extern int sr_voltagescale_vcbypass(u32 t_opp, u32 c_opp, u8 t_vsel, u8 
c_vsel);
diff --git a/arch/arm/mach-omap2/smartreflex.c 
b/arch/arm/mach-omap2/smartreflex.c
index 6f8b7cc..c399aea 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -30,7 +30,7 @@
 #include plat/omap34xx.h
 #include plat/control.h
 #include plat/clock.h
-#include plat/omap-pm.h
+#include plat/opp.h
 
 #include prm.h
 #include smartreflex.h
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
index 7b3ca11..29e4826 100644
--- a/arch/arm/plat-omap/cpu-omap.c
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -32,6 +32,7 @@
 
 #if defined(CONFIG_ARCH_OMAP3)  !defined(CONFIG_OMAP_PM_NONE)
 #include plat/omap-pm.h
+#include plat/opp.h
 #endif
 
 #define VERY_HI_RATE   9
diff --git a/arch/arm/plat-omap/include/plat/omap-pm.h 
b/arch/arm/plat-omap/include/plat/omap-pm.h
index aa36339..bdc11f2 100644
--- a/arch/arm/plat-omap/include/plat/omap-pm.h
+++ b/arch/arm/plat-omap/include/plat/omap-pm.h
@@ -20,10 +20,6 @@
 #include powerdomain.h
 #include plat/opp.h
 
-extern struct omap_opp *mpu_opps;
-extern struct omap_opp *dsp_opps;
-extern struct omap_opp *l3_opps;
-
 /*
  * agent_id values for use with omap_pm_set_min_bus_tput():
  *
@@ -46,11 +42,9 @@ extern struct omap_opp *l3_opps;
  * PM idle-loop code.
  */
 #ifdef CONFIG_OMAP_PM_NONE
-#define omap_pm_if_early_init(a, b, c) 0
+#define omap_pm_if_early_init() 0
 #else
-int __init omap_pm_if_early_init(struct omap_opp *mpu_opp_table,
-struct omap_opp *dsp_opp_table,
-struct omap_opp *l3_opp_table);
+int __init omap_pm_if_early_init(void);
 #endif
 
 /**
@@ -197,68 +191,6 @@ void omap_pm_set_max_dev_wakeup_lat(struct device *dev, 
long t);
  */
 void omap_pm_set_max_sdma_lat(struct device *dev, long t);
 
-
-/*
- * DSP Bridge-specific constraints
- */
-
-/**
- * omap_pm_dsp_get_opp_table - get OPP-DSP clock frequency table
- *
- * Intended for use by DSPBridge.  Returns an array of OPP-DSP clock
- * frequency entries.  The final item in the array should have .rate =
- * .opp_id = 0.
- */
-const struct omap_opp *omap_pm_dsp_get_opp_table(void);
-
-/**
- * omap_pm_dsp_set_min_opp - receive desired OPP target ID from DSP Bridge
- * @opp_id: target DSP OPP ID
- *
- * Set a minimum OPP ID for the DSP.  This is intended to be called
- * only from the DSP Bridge MPU-side driver.  Unfortunately, the only
- * information that code receives from the DSP/BIOS load estimator is the
- * target OPP ID; hence, this interface.  No return value.
- */
-void omap_pm_dsp_set_min_opp(u8 opp_id);
-
-/**
- * omap_pm_dsp_get_opp - report the current DSP OPP ID
- *
- * Report the current OPP for the DSP.  Since on OMAP3, the DSP and
- * MPU share a single voltage domain, the OPP ID returned back may
- * represent a higher DSP speed than the OPP requested via
- * omap_pm_dsp_set_min_opp().
- *
- * Returns the current VDD1 OPP ID, or 0 upon error.
- */
-u8 omap_pm_dsp_get_opp(void);
-
-/**
- * omap_pm_vdd1_get_opp - report the current VDD1 OPP
- *
- * Report the current VDD1 OPP number.
- *
- * Returns the current VDD1 OPP ID, or 0 upon error.
- */
-u8 omap_pm_vdd1_get_opp(void);
-
-/**
- * omap_pm_vdd2_get_opp - report the current VDD2 OPP
- *
- * Report the current VDD2 OPP number.
- *
- * Returns the current VDD2 OPP ID, or 0 upon error.
- */
-u8 omap_pm_vdd2_get_opp(void);
-
-/*
- * CPUFreq-originated constraint
- *
- * In the future, this should be handled by custom OPP clocktype
- * functions.
- */
-
 /**
  * omap_pm_cpu_get_freq_table - return a cpufreq_frequency_table array ptr
  *
diff --git