speedstep-smi: Use DMI to detect HP OmniBook 6000
PATCH 1/1 speedstep-smi: Use DMI to detect HP OmniBook 6000
HP OmniBook 6000 has bogus ist_info so use DMI to detect the system instead. Extensive use (eg. cpudynd) will hang the laptop after some time but it is still useful for changing the frequency on AC (un)plug.
Signed-off-by Ville Syrjala <[email protected]>
---
speedstep-smi.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+)
arch/i386/kernel/cpu/cpufreq/speedstep-smi.c +27 -0
@@ -20,6 +20,7 @@#include <linux/pci.h> #include <linux/slab.h> #include <linux/delay.h> +#include <linux/dmi.h> #include <asm/ist.h> #include "speedstep-lib.h"
@@ -341,6 +342,31 @@ .attr = speedstep_attr, }; +static int speedstep_dmi_callback (struct dmi_system_id *id) +{ +if (!smi_port) + smi_port = (long ) id->driver_data &0xff ; +if (!smi_cmd) + smi_cmd = ((long ) id->driver_data >>16 ) &0xff ; + smi_sig =1 ; + +return 0 ; +} + +static struct dmi_system_id __initdata speedstep_dmi_table[] = { + { + .callback = speedstep_dmi_callback, + .ident ="HP OmniBook 6000" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Hewlett-Packard" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"HP OmniBook PC" ), +DMI_MATCH (DMI_PRODUCT_VERSION ,"HP OmniBook 6000 EA" ), + }, + .driver_data = (void *)0x008200b2 , + }, + { } +}; +/** * speedstep_init - initializes the SpeedStep CPUFreq driver *
@@ -369,6 +395,7 @@dprintk ("signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n" , ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level); +dmi_check_system (speedstep_dmi_table);/* Error if no IST-SMI BIOS or no PARM sig= 'ISGE' aka 'Intel Speedstep Gate E' */
Signature · 3 lines
Ville Syrjälä [email protected] http://www.sci.fi/~syrjala/