diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/e_powersaver.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index 2882d40a3084..4bd6815d317b 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c | |||
@@ -43,6 +43,7 @@ static struct eps_cpu_data *eps_cpu[NR_CPUS]; | |||
43 | /* Module parameters */ | 43 | /* Module parameters */ |
44 | static int freq_failsafe_off; | 44 | static int freq_failsafe_off; |
45 | static int voltage_failsafe_off; | 45 | static int voltage_failsafe_off; |
46 | static int set_max_voltage; | ||
46 | 47 | ||
47 | #if defined CONFIG_ACPI_PROCESSOR || defined CONFIG_ACPI_PROCESSOR_MODULE | 48 | #if defined CONFIG_ACPI_PROCESSOR || defined CONFIG_ACPI_PROCESSOR_MODULE |
48 | static int ignore_acpi_limit; | 49 | static int ignore_acpi_limit; |
@@ -340,6 +341,21 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
340 | } | 341 | } |
341 | #endif | 342 | #endif |
342 | 343 | ||
344 | /* Allow user to set lower maximum voltage then that reported | ||
345 | * by processor */ | ||
346 | if (brand == EPS_BRAND_C7M && set_max_voltage) { | ||
347 | u32 v; | ||
348 | |||
349 | /* Change mV to something hardware can use */ | ||
350 | v = (set_max_voltage - 700) / 16; | ||
351 | /* Check if voltage is within limits */ | ||
352 | if (v >= min_voltage && v <= max_voltage) { | ||
353 | printk(KERN_INFO "eps: Setting %dmV as maximum.\n", | ||
354 | v * 16 + 700); | ||
355 | max_voltage = v; | ||
356 | } | ||
357 | } | ||
358 | |||
343 | /* Calc number of p-states supported */ | 359 | /* Calc number of p-states supported */ |
344 | if (brand == EPS_BRAND_C7M) | 360 | if (brand == EPS_BRAND_C7M) |
345 | states = max_multiplier - min_multiplier + 1; | 361 | states = max_multiplier - min_multiplier + 1; |
@@ -453,6 +469,8 @@ MODULE_PARM_DESC(voltage_failsafe_off, "Disable current vs max voltage check"); | |||
453 | module_param(ignore_acpi_limit, int, 0644); | 469 | module_param(ignore_acpi_limit, int, 0644); |
454 | MODULE_PARM_DESC(ignore_acpi_limit, "Don't check ACPI's processor speed limit"); | 470 | MODULE_PARM_DESC(ignore_acpi_limit, "Don't check ACPI's processor speed limit"); |
455 | #endif | 471 | #endif |
472 | module_param(set_max_voltage, int, 0644); | ||
473 | MODULE_PARM_DESC(set_max_voltage, "Set maximum CPU voltage (mV) C7-M only"); | ||
456 | 474 | ||
457 | MODULE_AUTHOR("Rafal Bilski <rafalbilski@interia.pl>"); | 475 | MODULE_AUTHOR("Rafal Bilski <rafalbilski@interia.pl>"); |
458 | MODULE_DESCRIPTION("Enhanced PowerSaver driver for VIA C7 CPU's."); | 476 | MODULE_DESCRIPTION("Enhanced PowerSaver driver for VIA C7 CPU's."); |