Commit 968e7353 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Add a module parameter to force ACPI to be used.

parent bce44e9f
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,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/init.h> #include <linux/init.h>
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -90,6 +91,12 @@ static int fid_codes[32] = { ...@@ -90,6 +91,12 @@ static int fid_codes[32] = {
150, 225, 160, 165, 170, 180, -1, -1, 150, 225, 160, 165, 170, 180, -1, -1,
}; };
/* This parameter is used in order to force ACPI instead of legacy method for
* configuration purpose.
*/
static int powernow_acpi_force;
static struct cpufreq_frequency_table *powernow_table; static struct cpufreq_frequency_table *powernow_table;
static unsigned int can_scale_bus; static unsigned int can_scale_bus;
...@@ -554,7 +561,7 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy) ...@@ -554,7 +561,7 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy)
} }
dprintk(KERN_INFO PFX "FSB: %3d.%03d MHz\n", fsb/1000, fsb%1000); dprintk(KERN_INFO PFX "FSB: %3d.%03d MHz\n", fsb/1000, fsb%1000);
if (dmi_broken & BROKEN_CPUFREQ) { if ((dmi_broken & BROKEN_CPUFREQ) || powernow_acpi_force) {
printk (KERN_INFO PFX "PSB/PST known to be broken. Trying ACPI instead\n"); printk (KERN_INFO PFX "PSB/PST known to be broken. Trying ACPI instead\n");
result = powernow_acpi_init(); result = powernow_acpi_init();
} else { } else {
...@@ -631,6 +638,10 @@ static void __exit powernow_exit (void) ...@@ -631,6 +638,10 @@ static void __exit powernow_exit (void)
kfree(powernow_table); kfree(powernow_table);
} }
module_param(powernow_acpi_force, int, 0444);
MODULE_PARM_DESC(powernow_acpi_force, "Force ACPI to be used");
MODULE_AUTHOR ("Dave Jones <davej@codemonkey.org.uk>"); MODULE_AUTHOR ("Dave Jones <davej@codemonkey.org.uk>");
MODULE_DESCRIPTION ("Powernow driver for AMD K7 processors."); MODULE_DESCRIPTION ("Powernow driver for AMD K7 processors.");
MODULE_LICENSE ("GPL"); MODULE_LICENSE ("GPL");
......
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