aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/cpufreq/powernow-k7.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/powernow-k7.c')
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k7.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c
index 4a45fd6e41b..d71d9f37235 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c
@@ -68,7 +68,6 @@ union powernow_acpi_control_t {
68}; 68};
69#endif 69#endif
70 70
71#ifdef CONFIG_CPU_FREQ_DEBUG
72/* divide by 1000 to get VCore voltage in V. */ 71/* divide by 1000 to get VCore voltage in V. */
73static const int mobile_vid_table[32] = { 72static const int mobile_vid_table[32] = {
74 2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650, 73 2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650,
@@ -76,7 +75,6 @@ static const int mobile_vid_table[32] = {
76 1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100, 75 1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100,
77 1075, 1050, 1025, 1000, 975, 950, 925, 0, 76 1075, 1050, 1025, 1000, 975, 950, 925, 0,
78}; 77};
79#endif
80 78
81/* divide by 10 to get FID. */ 79/* divide by 10 to get FID. */
82static const int fid_codes[32] = { 80static const int fid_codes[32] = {
@@ -103,9 +101,6 @@ static unsigned int fsb;
103static unsigned int latency; 101static unsigned int latency;
104static char have_a0; 102static char have_a0;
105 103
106#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
107 "powernow-k7", msg)
108
109static int check_fsb(unsigned int fsbspeed) 104static int check_fsb(unsigned int fsbspeed)
110{ 105{
111 int delta; 106 int delta;
@@ -209,7 +204,7 @@ static int get_ranges(unsigned char *pst)
209 vid = *pst++; 204 vid = *pst++;
210 powernow_table[j].index |= (vid << 8); /* upper 8 bits */ 205 powernow_table[j].index |= (vid << 8); /* upper 8 bits */
211 206
212 dprintk(" FID: 0x%x (%d.%dx [%dMHz]) " 207 pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) "
213 "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, 208 "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10,
214 fid_codes[fid] % 10, speed/1000, vid, 209 fid_codes[fid] % 10, speed/1000, vid,
215 mobile_vid_table[vid]/1000, 210 mobile_vid_table[vid]/1000,
@@ -367,7 +362,7 @@ static int powernow_acpi_init(void)
367 unsigned int speed, speed_mhz; 362 unsigned int speed, speed_mhz;
368 363
369 pc.val = (unsigned long) state->control; 364 pc.val = (unsigned long) state->control;
370 dprintk("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n", 365 pr_debug("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n",
371 i, 366 i,
372 (u32) state->core_frequency, 367 (u32) state->core_frequency,
373 (u32) state->power, 368 (u32) state->power,
@@ -401,7 +396,7 @@ static int powernow_acpi_init(void)
401 invalidate_entry(i); 396 invalidate_entry(i);
402 } 397 }
403 398
404 dprintk(" FID: 0x%x (%d.%dx [%dMHz]) " 399 pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) "
405 "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, 400 "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10,
406 fid_codes[fid] % 10, speed_mhz, vid, 401 fid_codes[fid] % 10, speed_mhz, vid,
407 mobile_vid_table[vid]/1000, 402 mobile_vid_table[vid]/1000,
@@ -409,7 +404,7 @@ static int powernow_acpi_init(void)
409 404
410 if (state->core_frequency != speed_mhz) { 405 if (state->core_frequency != speed_mhz) {
411 state->core_frequency = speed_mhz; 406 state->core_frequency = speed_mhz;
412 dprintk(" Corrected ACPI frequency to %d\n", 407 pr_debug(" Corrected ACPI frequency to %d\n",
413 speed_mhz); 408 speed_mhz);
414 } 409 }
415 410
@@ -453,8 +448,8 @@ static int powernow_acpi_init(void)
453 448
454static void print_pst_entry(struct pst_s *pst, unsigned int j) 449static void print_pst_entry(struct pst_s *pst, unsigned int j)
455{ 450{
456 dprintk("PST:%d (@%p)\n", j, pst); 451 pr_debug("PST:%d (@%p)\n", j, pst);
457 dprintk(" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n", 452 pr_debug(" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n",
458 pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); 453 pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid);
459} 454}
460 455
@@ -474,20 +469,20 @@ static int powernow_decode_bios(int maxfid, int startvid)
474 p = phys_to_virt(i); 469 p = phys_to_virt(i);
475 470
476 if (memcmp(p, "AMDK7PNOW!", 10) == 0) { 471 if (memcmp(p, "AMDK7PNOW!", 10) == 0) {
477 dprintk("Found PSB header at %p\n", p); 472 pr_debug("Found PSB header at %p\n", p);
478 psb = (struct psb_s *) p; 473 psb = (struct psb_s *) p;
479 dprintk("Table version: 0x%x\n", psb->tableversion); 474 pr_debug("Table version: 0x%x\n", psb->tableversion);
480 if (psb->tableversion != 0x12) { 475 if (psb->tableversion != 0x12) {
481 printk(KERN_INFO PFX "Sorry, only v1.2 tables" 476 printk(KERN_INFO PFX "Sorry, only v1.2 tables"
482 " supported right now\n"); 477 " supported right now\n");
483 return -ENODEV; 478 return -ENODEV;
484 } 479 }
485 480
486 dprintk("Flags: 0x%x\n", psb->flags); 481 pr_debug("Flags: 0x%x\n", psb->flags);
487 if ((psb->flags & 1) == 0) 482 if ((psb->flags & 1) == 0)
488 dprintk("Mobile voltage regulator\n"); 483 pr_debug("Mobile voltage regulator\n");
489 else 484 else
490 dprintk("Desktop voltage regulator\n"); 485 pr_debug("Desktop voltage regulator\n");
491 486
492 latency = psb->settlingtime; 487 latency = psb->settlingtime;
493 if (latency < 100) { 488 if (latency < 100) {
@@ -497,9 +492,9 @@ static int powernow_decode_bios(int maxfid, int startvid)
497 "Correcting.\n", latency); 492 "Correcting.\n", latency);
498 latency = 100; 493 latency = 100;
499 } 494 }
500 dprintk("Settling Time: %d microseconds.\n", 495 pr_debug("Settling Time: %d microseconds.\n",
501 psb->settlingtime); 496 psb->settlingtime);
502 dprintk("Has %d PST tables. (Only dumping ones " 497 pr_debug("Has %d PST tables. (Only dumping ones "
503 "relevant to this CPU).\n", 498 "relevant to this CPU).\n",
504 psb->numpst); 499 psb->numpst);
505 500
@@ -650,7 +645,7 @@ static int __cpuinit powernow_cpu_init(struct cpufreq_policy *policy)
650 printk(KERN_WARNING PFX "can not determine bus frequency\n"); 645 printk(KERN_WARNING PFX "can not determine bus frequency\n");
651 return -EINVAL; 646 return -EINVAL;
652 } 647 }
653 dprintk("FSB: %3dMHz\n", fsb/1000); 648 pr_debug("FSB: %3dMHz\n", fsb/1000);
654 649
655 if (dmi_check_system(powernow_dmi_table) || acpi_force) { 650 if (dmi_check_system(powernow_dmi_table) || acpi_force) {
656 printk(KERN_INFO PFX "PSB/PST known to be broken. " 651 printk(KERN_INFO PFX "PSB/PST known to be broken. "