]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00170141: Fix debug messages generated by CPUFREQ
authorRanjani Vaidyanathan <ra5478@freescale.com>
Tue, 13 Dec 2011 00:25:22 +0000 (18:25 -0600)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:10:18 +0000 (14:10 +0200)
When dvfs-core is enabled along with "debug" in command line, CPUFREQ
printed too many debug messages.
Fix this by changing the threshold settings for DVFS-CORE and
make the transitions more conservative and infrequent.
Also  use the CPUFREQ debug flag.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
arch/arm/mach-mx6/cpu_op-mx6.c
arch/arm/plat-mxc/cpufreq.c

index 30a4346282ea5c332b4c48bf6a2d644abd9f31db..40ee552c6b04175207bfc01b69f6bc6df8992b80 100644 (file)
@@ -78,14 +78,14 @@ static struct cpu_op mx6_cpu_op[] = {
 };
 
 static struct dvfs_op dvfs_core_setpoint_1G[] = {
-       {33, 14, 33, 10, 10, 0x08}, /* 1GHz*/
-       {30, 12, 33, 10, 10, 0x08},   /* 800MHz */
-       {28, 8, 33, 10, 10, 0x08},   /* 400MHz */
-       {20, 0, 33, 20, 10, 0x08} };   /* 200MHz*/
+       {33, 14, 33, 10, 128, 0x10}, /* 1GHz*/
+       {30, 12, 33, 100, 200, 0x10},   /* 800MHz */
+       {28, 8, 33, 100, 200, 0x10},   /* 400MHz */
+       {20, 0, 33, 20, 10, 0x10} };   /* 200MHz*/
 
 static struct dvfs_op dvfs_core_setpoint[] = {
-       {33, 14, 33, 10, 10, 0x08},   /* 800MHz */
-       {26, 8, 33, 10, 10, 0x08},   /* 400MHz */
+       {33, 14, 33, 10, 128, 0x08},   /* 800MHz */
+       {26, 8, 33, 100, 200, 0x08},   /* 400MHz */
        {20, 0, 33, 20, 10, 0x08} };   /* 200MHz*/
 
 static struct dvfs_op *mx6_get_dvfs_core_table(int *wp)
index f194f1cb92a08cb80525951189efb4594fdf74ce..0b44d11837a61cda3b0774cf27c805082f18ce4d 100755 (executable)
@@ -29,6 +29,9 @@
 #include <mach/hardware.h>
 #include <mach/clock.h>
 
+#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, \
+                                               "cpufreq-core", msg)
+
 #define CLK32_FREQ     32768
 #define NANOSECOND     (1000 * 1000 * 1000)
 
@@ -123,7 +126,16 @@ static int mxc_set_target(struct cpufreq_policy *policy,
                return 0;
 
        if (dvfs_core_is_active) {
-               printk(KERN_DEBUG"DVFS-CORE is active, cannot change frequency using CPUFREQ\n");
+               struct cpufreq_freqs freqs;
+
+               freqs.old = policy->cur;
+               freqs.new = clk_get_rate(cpu_clk) / 1000;
+               freqs.cpu = policy->cpu;
+               freqs.flags = 0;
+               cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
+               cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+
+               dprintk("DVFS core is active, cannot change FREQ using CPUFREQ\n");
                return ret;
        }