aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/pmac64-cpufreq.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2016-04-05 16:28:24 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-08 19:35:18 -0400
commitb49c22a6ca3656c68506fea57caf3d8f08878570 (patch)
tree2ae2b9a0457cd8bc27aedcbfcaa73fd03c4d24d4 /drivers/cpufreq/pmac64-cpufreq.c
parent4836df173aaed4b93e4d4b5c51e40f12e53ea26f (diff)
cpufreq: Convert printk(KERN_<LEVEL> to pr_<level>
Use the more common logging style. Miscellanea: o Coalesce formats o Realign arguments o Add a missing space between a coalesced format Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/pmac64-cpufreq.c')
-rw-r--r--drivers/cpufreq/pmac64-cpufreq.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index 4ff86878727f..5ffe0855ba8f 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -138,7 +138,7 @@ static void g5_vdnap_switch_volt(int speed_mode)
138 usleep_range(1000, 1000); 138 usleep_range(1000, 1000);
139 } 139 }
140 if (done == 0) 140 if (done == 0)
141 printk(KERN_WARNING "cpufreq: Timeout in clock slewing !\n"); 141 pr_warn("cpufreq: Timeout in clock slewing !\n");
142} 142}
143 143
144 144
@@ -266,7 +266,7 @@ static int g5_pfunc_switch_freq(int speed_mode)
266 rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL); 266 rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL);
267 267
268 if (rc) 268 if (rc)
269 printk(KERN_WARNING "cpufreq: pfunc switch error %d\n", rc); 269 pr_warn("cpufreq: pfunc switch error %d\n", rc);
270 270
271 /* It's an irq GPIO so we should be able to just block here, 271 /* It's an irq GPIO so we should be able to just block here,
272 * I'll do that later after I've properly tested the IRQ code for 272 * I'll do that later after I've properly tested the IRQ code for
@@ -282,7 +282,7 @@ static int g5_pfunc_switch_freq(int speed_mode)
282 usleep_range(500, 500); 282 usleep_range(500, 500);
283 } 283 }
284 if (done == 0) 284 if (done == 0)
285 printk(KERN_WARNING "cpufreq: Timeout in clock slewing !\n"); 285 pr_warn("cpufreq: Timeout in clock slewing !\n");
286 286
287 /* If frequency is going down, last ramp the voltage */ 287 /* If frequency is going down, last ramp the voltage */
288 if (speed_mode > g5_pmode_cur) 288 if (speed_mode > g5_pmode_cur)
@@ -368,7 +368,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
368 } 368 }
369 pvr_hi = (*valp) >> 16; 369 pvr_hi = (*valp) >> 16;
370 if (pvr_hi != 0x3c && pvr_hi != 0x44) { 370 if (pvr_hi != 0x3c && pvr_hi != 0x44) {
371 printk(KERN_ERR "cpufreq: Unsupported CPU version\n"); 371 pr_err("cpufreq: Unsupported CPU version\n");
372 goto bail_noprops; 372 goto bail_noprops;
373 } 373 }
374 374
@@ -403,8 +403,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
403 403
404 root = of_find_node_by_path("/"); 404 root = of_find_node_by_path("/");
405 if (root == NULL) { 405 if (root == NULL) {
406 printk(KERN_ERR "cpufreq: Can't find root of " 406 pr_err("cpufreq: Can't find root of device tree\n");
407 "device tree\n");
408 goto bail_noprops; 407 goto bail_noprops;
409 } 408 }
410 pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0"); 409 pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0");
@@ -412,8 +411,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
412 pmf_find_function(root, "slewing-done"); 411 pmf_find_function(root, "slewing-done");
413 if (pfunc_set_vdnap0 == NULL || 412 if (pfunc_set_vdnap0 == NULL ||
414 pfunc_vdnap0_complete == NULL) { 413 pfunc_vdnap0_complete == NULL) {
415 printk(KERN_ERR "cpufreq: Can't find required " 414 pr_err("cpufreq: Can't find required platform function\n");
416 "platform function\n");
417 goto bail_noprops; 415 goto bail_noprops;
418 } 416 }
419 417
@@ -453,10 +451,10 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
453 g5_pmode_cur = -1; 451 g5_pmode_cur = -1;
454 g5_switch_freq(g5_query_freq()); 452 g5_switch_freq(g5_query_freq());
455 453
456 printk(KERN_INFO "Registering G5 CPU frequency driver\n"); 454 pr_info("Registering G5 CPU frequency driver\n");
457 printk(KERN_INFO "Frequency method: %s, Voltage method: %s\n", 455 pr_info("Frequency method: %s, Voltage method: %s\n",
458 freq_method, volt_method); 456 freq_method, volt_method);
459 printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n", 457 pr_info("Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n",
460 g5_cpu_freqs[1].frequency/1000, 458 g5_cpu_freqs[1].frequency/1000,
461 g5_cpu_freqs[0].frequency/1000, 459 g5_cpu_freqs[0].frequency/1000,
462 g5_cpu_freqs[g5_pmode_cur].frequency/1000); 460 g5_cpu_freqs[g5_pmode_cur].frequency/1000);
@@ -493,7 +491,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
493 if (cpuid != NULL) 491 if (cpuid != NULL)
494 eeprom = of_get_property(cpuid, "cpuid", NULL); 492 eeprom = of_get_property(cpuid, "cpuid", NULL);
495 if (eeprom == NULL) { 493 if (eeprom == NULL) {
496 printk(KERN_ERR "cpufreq: Can't find cpuid EEPROM !\n"); 494 pr_err("cpufreq: Can't find cpuid EEPROM !\n");
497 rc = -ENODEV; 495 rc = -ENODEV;
498 goto bail; 496 goto bail;
499 } 497 }
@@ -511,7 +509,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
511 break; 509 break;
512 } 510 }
513 if (hwclock == NULL) { 511 if (hwclock == NULL) {
514 printk(KERN_ERR "cpufreq: Can't find i2c clock chip !\n"); 512 pr_err("cpufreq: Can't find i2c clock chip !\n");
515 rc = -ENODEV; 513 rc = -ENODEV;
516 goto bail; 514 goto bail;
517 } 515 }
@@ -539,7 +537,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
539 /* Check we have minimum requirements */ 537 /* Check we have minimum requirements */
540 if (pfunc_cpu_getfreq == NULL || pfunc_cpu_setfreq_high == NULL || 538 if (pfunc_cpu_getfreq == NULL || pfunc_cpu_setfreq_high == NULL ||
541 pfunc_cpu_setfreq_low == NULL || pfunc_slewing_done == NULL) { 539 pfunc_cpu_setfreq_low == NULL || pfunc_slewing_done == NULL) {
542 printk(KERN_ERR "cpufreq: Can't find platform functions !\n"); 540 pr_err("cpufreq: Can't find platform functions !\n");
543 rc = -ENODEV; 541 rc = -ENODEV;
544 goto bail; 542 goto bail;
545 } 543 }
@@ -567,7 +565,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
567 /* Get max frequency from device-tree */ 565 /* Get max frequency from device-tree */
568 valp = of_get_property(cpunode, "clock-frequency", NULL); 566 valp = of_get_property(cpunode, "clock-frequency", NULL);
569 if (!valp) { 567 if (!valp) {
570 printk(KERN_ERR "cpufreq: Can't find CPU frequency !\n"); 568 pr_err("cpufreq: Can't find CPU frequency !\n");
571 rc = -ENODEV; 569 rc = -ENODEV;
572 goto bail; 570 goto bail;
573 } 571 }
@@ -583,8 +581,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
583 581
584 /* Check for machines with no useful settings */ 582 /* Check for machines with no useful settings */
585 if (il == ih) { 583 if (il == ih) {
586 printk(KERN_WARNING "cpufreq: No low frequency mode available" 584 pr_warn("cpufreq: No low frequency mode available on this model !\n");
587 " on this model !\n");
588 rc = -ENODEV; 585 rc = -ENODEV;
589 goto bail; 586 goto bail;
590 } 587 }
@@ -595,7 +592,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
595 592
596 /* Sanity check */ 593 /* Sanity check */
597 if (min_freq >= max_freq || min_freq < 1000) { 594 if (min_freq >= max_freq || min_freq < 1000) {
598 printk(KERN_ERR "cpufreq: Can't calculate low frequency !\n"); 595 pr_err("cpufreq: Can't calculate low frequency !\n");
599 rc = -ENXIO; 596 rc = -ENXIO;
600 goto bail; 597 goto bail;
601 } 598 }
@@ -619,10 +616,10 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
619 g5_pmode_cur = -1; 616 g5_pmode_cur = -1;
620 g5_switch_freq(g5_query_freq()); 617 g5_switch_freq(g5_query_freq());
621 618
622 printk(KERN_INFO "Registering G5 CPU frequency driver\n"); 619 pr_info("Registering G5 CPU frequency driver\n");
623 printk(KERN_INFO "Frequency method: i2c/pfunc, " 620 pr_info("Frequency method: i2c/pfunc, Voltage method: %s\n",
624 "Voltage method: %s\n", has_volt ? "i2c/pfunc" : "none"); 621 has_volt ? "i2c/pfunc" : "none");
625 printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n", 622 pr_info("Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n",
626 g5_cpu_freqs[1].frequency/1000, 623 g5_cpu_freqs[1].frequency/1000,
627 g5_cpu_freqs[0].frequency/1000, 624 g5_cpu_freqs[0].frequency/1000,
628 g5_cpu_freqs[g5_pmode_cur].frequency/1000); 625 g5_cpu_freqs[g5_pmode_cur].frequency/1000);