From: "Ville Syrjälä" <syrjala@sci.fi>
To: Hiroshi Miura <miura@da-cha.org>
Cc: cpufreq@lists.linux.org.uk
Subject: [PATCH] speedstep-smi: Use DMI to detect HP OmniBook 6000
Date: Sun, 16 Jan 2005 23:51:47 +0200 [thread overview]
Message-ID: <20050116215147.GA15543@sci.fi> (raw)
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/
reply other threads:[~2005-01-16 21:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050116215147.GA15543@sci.fi \
--to=syrjala@sci.fi \
--cc=cpufreq@lists.linux.org.uk \
--cc=miura@da-cha.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.