mirror of https://gitee.com/openkylin/linux.git
[CPUFREQ] nforce2: Use driver prefix, not cpufreq prefix.
Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
parent
b5c9166662
commit
20174b65d9
|
@ -56,6 +56,7 @@ MODULE_PARM_DESC(fid, "CPU multiplier to use (11.5 = 115)");
|
||||||
MODULE_PARM_DESC(min_fsb,
|
MODULE_PARM_DESC(min_fsb,
|
||||||
"Minimum FSB to use, if not defined: current FSB - 50");
|
"Minimum FSB to use, if not defined: current FSB - 50");
|
||||||
|
|
||||||
|
#define PFX "cpufreq-nforce2: "
|
||||||
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
|
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
|
||||||
"cpufreq-nforce2", msg)
|
"cpufreq-nforce2", msg)
|
||||||
|
|
||||||
|
@ -175,13 +176,13 @@ static int nforce2_set_fsb(unsigned int fsb)
|
||||||
int pll = 0;
|
int pll = 0;
|
||||||
|
|
||||||
if ((fsb > max_fsb) || (fsb < NFORCE2_MIN_FSB)) {
|
if ((fsb > max_fsb) || (fsb < NFORCE2_MIN_FSB)) {
|
||||||
printk(KERN_ERR "cpufreq: FSB %d is out of range!\n", fsb);
|
printk(KERN_ERR PFX "FSB %d is out of range!\n", fsb);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
tfsb = nforce2_fsb_read(0);
|
tfsb = nforce2_fsb_read(0);
|
||||||
if (!tfsb) {
|
if (!tfsb) {
|
||||||
printk(KERN_ERR "cpufreq: Error while reading the FSB\n");
|
printk(KERN_ERR PFX "Error while reading the FSB\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +279,7 @@ static int nforce2_target(struct cpufreq_policy *policy,
|
||||||
/* local_irq_save(flags); */
|
/* local_irq_save(flags); */
|
||||||
|
|
||||||
if (nforce2_set_fsb(target_fsb) < 0)
|
if (nforce2_set_fsb(target_fsb) < 0)
|
||||||
printk(KERN_ERR "cpufreq: Changing FSB to %d failed\n",
|
printk(KERN_ERR PFX "Changing FSB to %d failed\n",
|
||||||
target_fsb);
|
target_fsb);
|
||||||
else
|
else
|
||||||
dprintk("Changed FSB successfully to %d\n",
|
dprintk("Changed FSB successfully to %d\n",
|
||||||
|
@ -329,9 +330,8 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy)
|
||||||
/* FIX: Get FID from CPU */
|
/* FIX: Get FID from CPU */
|
||||||
if (!fid) {
|
if (!fid) {
|
||||||
if (!cpu_khz) {
|
if (!cpu_khz) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING PFX
|
||||||
"cpufreq: cpu_khz not set, "
|
"cpu_khz not set, can't calculate multiplier!\n");
|
||||||
"can't calculate multiplier!\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printk(KERN_INFO "cpufreq: FSB currently at %i MHz, FID %d.%d\n", fsb,
|
printk(KERN_INFO PFX "FSB currently at %i MHz, FID %d.%d\n", fsb,
|
||||||
fid / 10, fid % 10);
|
fid / 10, fid % 10);
|
||||||
|
|
||||||
/* Set maximum FSB to FSB at boot time */
|
/* Set maximum FSB to FSB at boot time */
|
||||||
|
@ -402,10 +402,10 @@ static unsigned int nforce2_detect_chipset(void)
|
||||||
if (nforce2_dev == NULL)
|
if (nforce2_dev == NULL)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
printk(KERN_INFO "cpufreq: Detected nForce2 chipset revision %X\n",
|
printk(KERN_INFO PFX "Detected nForce2 chipset revision %X\n",
|
||||||
nforce2_dev->revision);
|
nforce2_dev->revision);
|
||||||
printk(KERN_INFO
|
printk(KERN_INFO PFX
|
||||||
"cpufreq: FSB changing is maybe unstable and can lead to "
|
"FSB changing is maybe unstable and can lead to "
|
||||||
"crashes and data loss.\n");
|
"crashes and data loss.\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -424,7 +424,7 @@ static int __init nforce2_init(void)
|
||||||
|
|
||||||
/* detect chipset */
|
/* detect chipset */
|
||||||
if (nforce2_detect_chipset()) {
|
if (nforce2_detect_chipset()) {
|
||||||
printk(KERN_ERR "cpufreq: No nForce2 chipset.\n");
|
printk(KERN_ERR PFX "No nForce2 chipset.\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue