Skip to contentSkip to conversation

omap3: pm: introduce support for 3630 OPPs

PATCH In review Nishanth Menon 3 participants 10 messages Dec 12, 2009 – Dec 18, 2009 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [PATCH 02/10 V4] omap3: pm: introduce opp accessor functions

#1 lore raw

v5 cover omap3: pm: introduce support for 3630 OPPs

Hi,
Thanks for all the comments. Here are the *changed* patches since V5

What changed in V5:
* review comment incorporated
* vsel is deprecated now
* I seem to have hit a checkpatch.pl bug as in
http://lkml.org/lkml/2009/12/11/573, made me check the usage of __deprecated for struct params, and used it in a consistent manner to functions..
* More warnings added to build :( (deprecated ones ofcourse)
* removed OMAP_OPP_DEF_TERMINATOR
* 3430 and 3630 patches changed as a result

History:
V4: http://marc.info/?t=126033962600001&r=1&w=2
V3: http://marc.info/?t=125912234200001&r=1&w=2
V2: http://marc.info/?l=linux-omap&m=125809232732700&w=2
V1: http://marc.info/?l=linux-omap&m=125800488923479&w=2

Ref: http://elinux.org/OMAP_Power_Management#Future_directions

TODO: The list is still the same as in:
http://marc.info/?l=linux-omap&m=126033945313269&w=2

Regards,
Nishanth Menon

#2 lore raw

PATCH v5 2/10 omap3: pm: introduce opp accessor functions

Modifies the initial patch From Sanjeev:
http://patchwork.kernel.org/patch/50998/
Discussions and comments from:
http://marc.info/?l=linux-omap&m=126033945313269&w=2
http://marc.info/?l=linux-omap&m=125482970102327&w=2
http://marc.info/?t=125809247500002&r=1&w=2
http://marc.info/?l=linux-omap&m=126025973426007&w=2
incorporated.

OMAP SOCs have a standard set of tuples consisting of frequency and voltage pairs that the device will support per voltage domain. This is called Operating Points or OPP. The actual definitions of OMAP Operating Points varies over silicon within the same family of devices. For a specific domain, you can have a set of {frequency, voltage} pairs. As the kernel boots and more information is available, a set of these are activated based on the precise nature of device the kernel boots up on. It is interesting to remember that each IP which belongs to a voltage domain may define their own set of OPPs on top of this.

This introduces a common handling OPP mechanism accross all OMAPs. As a start this is introduced for OMAP3 and intends to replace current OMAP3 opp handling mechanism.

Note:
fields of struct omap_opp is currently exposed due to the necessity that SRF and SR logic directly indexes the structure array fields. The goal however, is to make the direct usage of omap_opp deprecated and move to using these accessor functions. The usage in SRF and SR indexes based on opp_id and hence opp_id is marked deprecated to generate build warnings at least. Further, this usage necessitates need of terminator entries at the start and end of opp_* tables which are dynamically allocated.

The accessor function definitions were collaborated with Kevin, and doing justice here, this implementation could not go with some of the better suggestions from kevin due to constraint imposed by SRF and SR. A better and more optimal implementation is definitely possible once SRF and SR are cleanedup/replaced.

NOTE: OPP is a concept that can be used in all OMAPs, it is hence introduced under plat-omap

Introduces warning:
arch/arm/plat-omap/opp.c: In function 'opp_get_voltage':
arch/arm/plat-omap/opp.c:53: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c: In function 'opp_get_opp_count':
arch/arm/plat-omap/opp.c:76: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c: In function 'opp_find_freq_exact':
arch/arm/plat-omap/opp.c:94: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:96: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:102: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c: In function 'opp_find_freq_approx':
arch/arm/plat-omap/opp.c:115: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:119: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:122: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:130: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c: In function 'omap_opp_populate':
arch/arm/plat-omap/opp.c:143: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:145: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:146: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c: In function 'opp_add':
arch/arm/plat-omap/opp.c:160: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:167: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:191: warning: 'opp_id' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33) arch/arm/plat-omap/opp.c:194: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:199: warning: 'opp_id' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33) arch/arm/plat-omap/opp.c: In function 'opp_init_list':
arch/arm/plat-omap/opp.c:236: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/plat-omap/opp.c:240: warning: 'opp_id' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:33) arch/arm/plat-omap/opp.c:249: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34)

Cc Benoit Cousson <[email protected]>
Cc Eduardo Valentin <[email protected]>
Cc Madhusudhan Chikkature Rajashekar <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Romit Dasgupta <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Sergio Alberto Aguirre Rodriguez <[email protected]>
Cc Tero Kristo <[email protected]>
Cc Thara Gopinath <[email protected]>
Cc Vishwanath Sripathy <[email protected]>

---
Kevin,
I have put your Signed-off-by to ack your contribs. pending formal confirmation ofcourse.

 arch/arm/plat-omap/Makefile           |    3 +
 arch/arm/plat-omap/include/plat/opp.h |  231 ++++++++++++++++++++++++++++
 arch/arm/plat-omap/opp.c              |  271 +++++++++++++++++++++++++++++++++
 3 files changed, 505 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-omap/include/plat/opp.h
 create mode 100644 arch/arm/plat-omap/opp.c
arch/arm/plat-omap/Makefile +3 -0
index 95f8413..e9cf601 100644
@@ -12,6 +12,9 @@ obj-  :=
 # OCPI interconnect support for 1710, 1610 and 5912
 obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
 
+# OPP support in (OMAP3+ only at the moment)
+obj-$(CONFIG_ARCH_OMAP3) += opp.o
+
 # omap_device support (OMAP2+ only at the moment)
 obj-$(CONFIG_ARCH_OMAP2) += omap_device.o
 obj-$(CONFIG_ARCH_OMAP3) += omap_device.o
arch/arm/plat-omap/include/plat/opp.h new file +231 -0

231 lines not on this page · raw message

arch/arm/plat-omap/opp.c new file +271 -0

271 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#3 lore raw

PATCH v5 3/10 omap3: pm: use opp accessor functions for omap34xx

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/smartreflex.c: In function 'sr_configure_vp':
arch/arm/mach-omap2/smartreflex.c:307: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/mach-omap2/smartreflex.c:309: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/mach-omap2/smartreflex.c:353: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/mach-omap2/smartreflex.c:355: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/mach-omap2/smartreflex.c: In function 'sr_reset_voltage':
arch/arm/mach-omap2/smartreflex.c:461: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/mach-omap2/smartreflex.c:472: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/mach-omap2/smartreflex.c: In function 'sr_enable':
arch/arm/mach-omap2/smartreflex.c:582: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/mach-omap2/smartreflex.c:600: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) 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) arch/arm/mach-omap2/resource34xx.c:293: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/mach-omap2/resource34xx.c:308: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34) arch/arm/mach-omap2/resource34xx.c:309: warning: 'vsel' is deprecated (declared at arch/arm/plat-omap/include/plat/opp.h:34)

Cc Benoit Cousson <[email protected]>
Cc Eduardo Valentin <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Madhusudhan Chikkature Rajashekar <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Romit Dasgupta <[email protected]>
Cc Sanjeev Premi <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Sergio Alberto Aguirre Rodriguez <[email protected]>
Cc Tero Kristo <[email protected]>
Cc Thara Gopinath <[email protected]>
Cc Vishwanath Sripathy <[email protected]>
---
 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(-)
arch/arm/mach-omap2/board-3430sdp.c +1 -0
index eac529f..0ec8327 100644
@@ -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,
arch/arm/mach-omap2/board-omap3beagle.c +1 -0
index 2ec3520..a937238 100644
@@ -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);
arch/arm/mach-omap2/board-omap3evm.c +1 -0
index 8130eca..44a5861 100644
@@ -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();
arch/arm/mach-omap2/board-rx51.c +1 -0
index 2f1c2be..997fd1c 100644
@@ -103,6 +103,7 @@ static void __init rx51_init_irq(void)
 
 	omap_board_config = rx51_config;
 	omap_board_config_size = ARRAY_SIZE(rx51_config);
+	omap3_pm_init_opp_table();
 	omap3_pm_init_cpuidle(rx51_cpuidle_params);
 	sdrc_params = rx51_get_sdram_timings();
 	omap2_init_common_hw(sdrc_params, sdrc_params,
arch/arm/mach-omap2/board-zoom2.c +2 -0
index dcc5fb8..9d5b078 100644
@@ -24,10 +24,12 @@
 #include <mach/board-zoom.h>
 
 #include "sdram-micron-mt46h32m32lf-6.h"
+#include "pm.h"
 #include "omap3-opp.h"
 
 static void __init omap_zoom2_init_irq(void)
 {
+	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);
arch/arm/mach-omap2/omap3-opp.h +3 -55

63 lines not on this page · raw message

arch/arm/mach-omap2/pm.h +6 -0
index 7bc86b6..80a1c1d 100644
@@ -58,6 +58,12 @@ static inline void omap3_pm_init_cpuidle(
 {
 }
 #endif
+/**
+ * omap3_pm_init_opp_table - OMAP opp table lookup called after cpu is detected.
+ * Initialize the basic opp table here, board files could choose to modify opp
+ * table after the basic initialization
+ */
+extern void omap3_pm_init_opp_table(void);
 
 extern int resource_set_opp_level(int res, u32 target_level, int flags);
 extern int resource_access_opp_lock(int res, int delta);
arch/arm/mach-omap2/pm34xx.c +68 -0

92 lines not on this page · raw message

arch/arm/plat-omap/include/plat/omap-pm.h +1 -16
index 5dc2048..aa36339 100644
@@ -18,22 +18,7 @@
 #include <linux/cpufreq.h>
 
 #include "powerdomain.h"
-
-/**
- * struct omap_opp - clock frequency-to-OPP ID table for DSP, MPU
- * @enabled: enabled if true, disabled if false
- * @rate: target clock rate
- * @opp_id: OPP ID
- * @min_vdd: minimum VDD1 voltage (in millivolts) for this OPP
- *
- * Operating performance point data.  Can vary by OMAP chip and board.
- */
-struct omap_opp {
-	bool enabled;
-	unsigned long rate;
-	u8 opp_id;
-	u16 vsel;
-};
+#include <plat/opp.h>
 
 extern struct omap_opp *mpu_opps;
 extern struct omap_opp *dsp_opps;
Signature · 1 line
1.6.3.3
#4 lore raw

PATCH v5 9/10 omap3: pm: introduce 3630 opps

Introduce the OMAP3630 OPPs including the defined OPP tuples.

Further information on OMAP3630 can be found here:
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12836&contentId=52606

OMAP36xx family introduces:
VDD1 with 4 OPPs, of which OPP3 & 4 are available only on devices yet to be introduced in 36xx family. Meanwhile, VDD2 has 2 opps.

Device Support of OPPs->

           |<-3630-600->| (default)
           |<-      3630-800    ->| (device: TBD)
           |<-      3630-1000            ->| (device: TBD)
H/w OPP-> OPP50 OPP100       OPP-Turbo   OPP1G-SB
VDD1      OPP1  OPP2         OPP3        OPP4
VDD2      OPP1  OPP2         OPP2        OPP2

Note:
a) TI h/w naming for OPPs are now standardized in terms of OPP50, 100, Turbo and SB. This maps as shown above to the opp IDs (s/w term).
b) For boards which need custom VDD1/2 OPPs, the opp table can be updated by the board file on a need basis after the omap3_pm_init_opp_table call. The OPPs introduced here are the official OPP table at this point in time.

Cc Benoit Cousson <[email protected]>
Cc Eduardo Valentin <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Madhusudhan Chikkature Rajashekar <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Romit Dasgupta <[email protected]>
Cc Sanjeev Premi <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Sergio Alberto Aguirre Rodriguez <[email protected]>
Cc Tero Kristo <[email protected]>
Cc Thara Gopinath <[email protected]>
Cc Vishwanath Sripathy <[email protected]>
---
 arch/arm/mach-omap2/pm34xx.c |   46 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 45 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/pm34xx.c +45 -1
index f9d061d..73bfc18 100644
@@ -143,6 +143,41 @@ static struct omap_opp_def __initdata omap34xx_dsp_rate_table[] = {
 	OMAP_OPP_DEF(0, 0, 0)
 };
 
+static struct omap_opp_def __initdata omap36xx_mpu_rate_table[] = {
+	/* OPP1 - OPP50 */
+	OMAP_OPP_DEF(true,  300000000, 930000),
+	/* OPP2 - OPP100 */
+	OMAP_OPP_DEF(true,  600000000, 1100000),
+	/* OPP3 - OPP-Turbo */
+	OMAP_OPP_DEF(false, 800000000, 1260000),
+	/* OPP4 - OPP-SB */
+	OMAP_OPP_DEF(false, 1000000000, 1310000),
+	/* Terminator */
+	OMAP_OPP_DEF(0, 0, 0)
+};
+
+static struct omap_opp_def __initdata omap36xx_l3_rate_table[] = {
+	/* OPP1 - OPP50 */
+	OMAP_OPP_DEF(true, 100000000, 930000),
+	/* OPP2 - OPP100, OPP-Turbo, OPP-SB */
+	OMAP_OPP_DEF(true, 200000000, 1137500),
+	/* Terminator */
+	OMAP_OPP_DEF(0, 0, 0)
+};
+
+static struct omap_opp_def __initdata omap36xx_dsp_rate_table[] = {
+	/* OPP1 - OPP50 */
+	OMAP_OPP_DEF(true,  260000000, 930000),
+	/* OPP2 - OPP100 */
+	OMAP_OPP_DEF(true,  520000000, 1100000),
+	/* OPP3 - OPP-Turbo */
+	OMAP_OPP_DEF(false, 660000000, 1260000),
+	/* OPP4 - OPP-SB */
+	OMAP_OPP_DEF(false, 875000000, 1310000),
+	/* Terminator */
+	OMAP_OPP_DEF(0, 0, 0)
+};
+
 /* OMAP3 Rate Table */
 struct omap_opp *omap3_mpu_rate_table;
 struct omap_opp *omap3_dsp_rate_table;
@@ -1299,18 +1334,27 @@ static void __init configure_vc(void)
 void __init omap3_pm_init_opp_table(void)
 {
 	int i;
+	struct omap_opp_def **omap3_opp_def_list;
 	struct omap_opp_def *omap34xx_opp_def_list[] = {
 		omap34xx_mpu_rate_table,
 		omap34xx_l3_rate_table,
 		omap34xx_dsp_rate_table
 	};
+	struct omap_opp_def *omap36xx_opp_def_list[] = {
+		omap36xx_mpu_rate_table,
+		omap36xx_l3_rate_table,
+		omap36xx_dsp_rate_table
+	};
 	struct omap_opp **omap3_rate_tables[] = {
 		&omap3_mpu_rate_table,
 		&omap3_l3_rate_table,
 		&omap3_dsp_rate_table
 	};
+
+	omap3_opp_def_list = cpu_is_omap3630() ? omap36xx_opp_def_list :
+				omap34xx_opp_def_list;
 	for (i = 0; i < ARRAY_SIZE(omap3_rate_tables); i++) {
-		*omap3_rate_tables[i] = opp_init_list(omap34xx_opp_def_list[i]);
+		*omap3_rate_tables[i] = opp_init_list(omap3_opp_def_list[i]);
 		/* We dont want half configured system at the moment */
 		BUG_ON(IS_ERR(omap3_rate_tables[i]));
 	}
Signature · 1 line
1.6.3.3
#5 lore raw
In reply to Nishanth Menon
Quoted 20 lines · Nishanth Menon

Hi,
Thanks for all the comments. Here are the *changed* patches since V5

What changed in V5:
* review comment incorporated
* vsel is deprecated now
* I seem to have hit a checkpatch.pl bug as in
http://lkml.org/lkml/2009/12/11/573, made me check the usage of __deprecated for struct params, and used it in a consistent manner to functions..
* More warnings added to build :( (deprecated ones ofcourse)
* removed OMAP_OPP_DEF_TERMINATOR
* 3430 and 3630 patches changed as a result

History:
V4: http://marc.info/?t=126033962600001&r=1&w=2
V3: http://marc.info/?t=125912234200001&r=1&w=2
V2: http://marc.info/?l=linux-omap&m=125809232732700&w=2
V1: http://marc.info/?l=linux-omap&m=125800488923479&w=2

Quoted 4 lines

Ref: http://elinux.org/OMAP_Power_Management#Future_directions

TODO: The list is still the same as in:
http://marc.info/?l=linux-omap&m=126033945313269&w=2

FYI...

To facilitate the ongoing discussions on OPP rework, and to have a common base, this series is available as a branch in my linux-omap-pm repo[1].

The branch is called 'pm-wip-opp' and I have rebased onto the PM branch I pushed today.

Kevin

[1] http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git

#6 lore raw
Quoted 15 lines · Kevin Hilman
Quoted 13 lines · Nishanth Menon

Hi,
Thanks for all the comments. Here are the *changed* patches since V5

What changed in V5:
* review comment incorporated
* vsel is deprecated now
* I seem to have hit a checkpatch.pl bug as in
http://lkml.org/lkml/2009/12/11/573, made me check the usage of __deprecated for struct params, and used it in a consistent manner to functions..
* More warnings added to build :( (deprecated ones ofcourse)
* removed OMAP_OPP_DEF_TERMINATOR
* 3430 and 3630 patches changed as a result

[...]

Quoted 6 lines

To facilitate the ongoing discussions on OPP rework, and to have a common base, this series is available as a branch in my linux-omap-pm repo[1].

The branch is called 'pm-wip-opp' and I have rebased onto the PM branch I pushed today.

I forgot to mention that I've also pushed the patch for removing OPP interface from the OMAP PM layer[1] to the work-in-progress OPP branch.

Kevin

[1] http://marc.info/?l=linux-omap&m=125917007423545&w=2

#7 lore raw

Kevin Hilman said the following on 12/17/2009 04:07 AM:

Quoted 23 lines
Quoted 17 lines · Kevin Hilman
Quoted 14 lines · Nishanth Menon

Hi,
Thanks for all the comments. Here are the *changed* patches since V5

What changed in V5:
* review comment incorporated
* vsel is deprecated now
* I seem to have hit a checkpatch.pl bug as in
http://lkml.org/lkml/2009/12/11/573, made me check the usage of __deprecated for struct params, and used it in a consistent manner to functions..
* More warnings added to build :( (deprecated ones ofcourse)
* removed OMAP_OPP_DEF_TERMINATOR
* 3430 and 3630 patches changed as a result

[...]

Quoted 9 lines
Quoted 7 lines

To facilitate the ongoing discussions on OPP rework, and to have a common base, this series is available as a branch in my linux-omap-pm repo[1].

The branch is called 'pm-wip-opp' and I have rebased onto the PM branch I pushed today.

Thanks Kevin.

Quoted 8 lines

I forgot to mention that I've also pushed the patch for removing OPP interface from the OMAP PM layer[1] to the work-in-progress OPP branch.

Kevin

[1] http://marc.info/?l=linux-omap&m=125917007423545&w=2

Reg [1]
What is the point of having
void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
<http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=blob;f=arch/arm/mach-omap2/io.c;h=a45ff981b8d65ed3004cec7b4e3431862d4447de;hb=925b2120f036c3374df3f58aeb2a0f39d1ba8d84#l305> struct omap_sdrc_params *sdrc_cs1,
<http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=blob;f=arch/arm/mach-omap2/io.c;h=a45ff981b8d65ed3004cec7b4e3431862d4447de;hb=925b2120f036c3374df3f58aeb2a0f39d1ba8d84#l306> struct omap_opp *mpu_opps,
<http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=blob;f=arch/arm/mach-omap2/io.c;h=a45ff981b8d65ed3004cec7b4e3431862d4447de;hb=925b2120f036c3374df3f58aeb2a0f39d1ba8d84#l307> struct omap_opp *dsp_opps,
<http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=blob;f=arch/arm/mach-omap2/io.c;h=a45ff981b8d65ed3004cec7b4e3431862d4447de;hb=925b2120f036c3374df3f58aeb2a0f39d1ba8d84#l308> struct omap_opp *l3_opps)

Why have mpu_opps, dsp_opps and l3_opps anymore? those parameters are unused anymore. the patch should have changed omap2_init_common_hw and related board calls - am I right?

regards,
Nishanth Menon
Ref:
[1]: http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=commitdiff;h=925b2120f036c3374df3f58aeb2a0f39d1ba8d84

#8 lore raw
Quoted 51 lines · Nishanth

Kevin Hilman said the following on 12/17/2009 04:07 AM:

Quoted 23 lines
Quoted 17 lines · Kevin Hilman
Quoted 14 lines · Nishanth Menon

Hi,
Thanks for all the comments. Here are the *changed* patches since V5

What changed in V5:
* review comment incorporated
* vsel is deprecated now
* I seem to have hit a checkpatch.pl bug as in
http://lkml.org/lkml/2009/12/11/573, made me check the usage
of __deprecated for struct params, and used it in a consistent manner to functions..
* More warnings added to build :( (deprecated ones ofcourse)
* removed OMAP_OPP_DEF_TERMINATOR
* 3430 and 3630 patches changed as a result

[...]

Quoted 9 lines
Quoted 7 lines

To facilitate the ongoing discussions on OPP rework, and to have a common base, this series is available as a branch in my linux-omap-pm repo[1].

The branch is called 'pm-wip-opp' and I have rebased onto the PM branch I pushed today.

Thanks Kevin.

Quoted 8 lines

I forgot to mention that I've also pushed the patch for removing OPP interface from the OMAP PM layer[1] to the work-in-progress OPP branch.

Kevin

[1] http://marc.info/?l=linux-omap&m=125917007423545&w=2

Reg [1]
What is the point of having
void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, struct omap_sdrc_params *sdrc_cs1,
struct omap_opp *mpu_opps,
struct omap_opp *dsp_opps,
struct omap_opp *l3_opps)

Quoted 3 lines

Why have mpu_opps, dsp_opps and l3_opps anymore? those parameters are unused anymore. the patch should have changed omap2_init_common_hw and related board calls - am I right?

Yes, I'm in the process cleaning that up.

Once I get some of that cleanup done, I plan to rebase your OPP V5 and include it in the PM branch.

Kevin

#9 lore raw
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

[...]

Quoted 4 lines

To facilitate the ongoing discussions on OPP rework, and to have a common base, this series is available as a branch in my linux-omap-pm repo[1].

<snip>

Quoted 6 lines

Yes, I'm in the process cleaning that up.

Once I get some of that cleanup done, I plan to rebase your OPP V5 and include it in the PM branch.
I tried the latest HEAD on pm-wip-opp. Looks like the cpufreq tables are not

initialized because are not initializing {mpu|dsp|l3}_opps. Looks like the comment on the latest commit is to use OPP APIs directly. Is there any patch currently on that direction? Otherwise in the pm-wip-opp branch cpufreq is broken.

Thanks,
-Romit

#10 lore raw
Quoted 9 lines · Romit Dasgupta
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

[...]

Quoted 4 lines

To facilitate the ongoing discussions on OPP rework, and to have a common base, this series is available as a branch in my linux-omap-pm repo[1].

<snip>

Quoted 1 line
Quoted 7 lines
Quoted 4 lines

Yes, I'm in the process cleaning that up.

Once I get some of that cleanup done, I plan to rebase your OPP V5 and include it in the PM branch.

I tried the latest HEAD on pm-wip-opp. Looks like the cpufreq tables are not initialized because are not initializing {mpu|dsp|l3}_opps.

Good catch. The patch below should fix that. I've folded it into my "OMAP3: PM: remove OPP interfaces from OMAP PM layer" patch at the tip of pm-wip-opp and pushed a new version of that branch.

Quoted 3 lines

Looks like the comment on the latest commit is to use OPP APIs directly. Is there any patch currently on that direction? Otherwise in the pm-wip-opp branch cpufreq is broken.

Please try this patch on top of your current code, or pull a new version of pm-wip-opp which should have this included.

Kevin

arch/arm/mach-omap2/pm34xx.c +4 -0
index 37f0f0d..86d0304 100644
@@ -1377,6 +1377,10 @@ void __init omap3_pm_init_opp_table(void)
                /* We dont want half configured system at the moment */
                BUG_ON(IS_ERR(omap3_rate_tables[i]));
        }
+
+       mpu_opps = omap3_mpu_rate_table;
+       dsp_opps = omap3_dsp_reate_table;
+       l3_opps = omap3_l3_rate_table;
 }