Commit 3c892fff authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Quieten the powernow-k7 init printk a little.

There seem to be quite a few desktop K7 processors which support the
powernow cpuid call, but don't actually offer any powernow scaling.
In which case the driver prints out
"PowerNOW! Technology present. Can scale: nothing" which looks a bit odd,
and just adds to confusion of end-users.
Change things so that we don't print anything at all if we can't do anything.

Also kill some trailing whitespace gremlins that crept in.
parent a936d500
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
...@@ -86,7 +86,7 @@ static int mobile_vid_table[32] = { ...@@ -86,7 +86,7 @@ static int mobile_vid_table[32] = {
/* divide by 10 to get FID. */ /* divide by 10 to get FID. */
static int fid_codes[32] = { static int fid_codes[32] = {
110, 115, 120, 125, 50, 55, 60, 65, 110, 115, 120, 125, 50, 55, 60, 65,
70, 75, 80, 85, 90, 95, 100, 105, 70, 75, 80, 85, 90, 95, 100, 105,
30, 190, 40, 200, 130, 135, 140, 210, 30, 190, 40, 200, 130, 135, 140, 210,
150, 225, 160, 165, 170, 180, -1, -1, 150, 225, 160, 165, 170, 180, -1, -1,
}; };
...@@ -144,6 +144,11 @@ static int check_powernow(void) ...@@ -144,6 +144,11 @@ static int check_powernow(void)
} }
cpuid(0x80000007, &eax, &ebx, &ecx, &edx); cpuid(0x80000007, &eax, &ebx, &ecx, &edx);
/* Check we can actually do something before we say anything.*/
if (!(edx & (1 << 1 | 1 << 2)))
return 0;
printk (KERN_INFO PFX "PowerNOW! Technology present. Can scale: "); printk (KERN_INFO PFX "PowerNOW! Technology present. Can scale: ");
if (edx & 1 << 1) { if (edx & 1 << 1) {
...@@ -159,11 +164,6 @@ static int check_powernow(void) ...@@ -159,11 +164,6 @@ static int check_powernow(void)
can_scale_vid=1; can_scale_vid=1;
} }
if (!(edx & (1 << 1 | 1 << 2))) {
printk ("nothing.\n");
return 0;
}
printk (".\n"); printk (".\n");
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment