All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] speedstep-smi: Use DMI to detect HP OmniBook 6000
@ 2005-01-16 21:51 Ville Syrjälä
  0 siblings, 0 replies; only message in thread
From: Ville Syrjälä @ 2005-01-16 21:51 UTC (permalink / raw)
  To: Hiroshi Miura; +Cc: cpufreq

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 <syrjala@sci.fi>
---

 speedstep-smi.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+)

--- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c	2004-12-19 13:32:19.000000000 +0200
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c	2005-01-13 10:07:11.000000000 +0200
@@ -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' */
-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-16 21:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-16 21:51 [PATCH] speedstep-smi: Use DMI to detect HP OmniBook 6000 Ville Syrjälä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.