From: Ranjani Vaidyanathan Date: Tue, 13 Dec 2011 00:25:22 +0000 (-0600) Subject: ENGR00170141: Fix debug messages generated by CPUFREQ X-Git-Tag: v3.0.35-fsl_4.1.0~1931 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b8dc9ed18c83e3fbef580b70bc3335ff2e297df5;p=karo-tx-linux.git ENGR00170141: Fix debug messages generated by CPUFREQ 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 --- diff --git a/arch/arm/mach-mx6/cpu_op-mx6.c b/arch/arm/mach-mx6/cpu_op-mx6.c index 30a4346282ea..40ee552c6b04 100644 --- a/arch/arm/mach-mx6/cpu_op-mx6.c +++ b/arch/arm/mach-mx6/cpu_op-mx6.c @@ -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) diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index f194f1cb92a0..0b44d11837a6 100755 --- a/arch/arm/plat-mxc/cpufreq.c +++ b/arch/arm/plat-mxc/cpufreq.c @@ -29,6 +29,9 @@ #include #include +#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; }