diff options
author | Dave Jones <davej@redhat.com> | 2005-05-31 19:03:51 -0700 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2005-05-31 19:03:51 -0700 |
commit | 1174631418fbb2c0c6946081b0b7d391f5d92861 (patch) | |
tree | 17037bd66cf4958ce3d3468f9210dbc67d1c3cbc /arch | |
parent | 3be6a48f3c8df1b2fbbe57face95a03d167bda1b (diff) | |
download | linux-1174631418fbb2c0c6946081b0b7d391f5d92861.tar.bz2 |
[CPUFREQ] Longhaul: Magic timer frobbing.
As mandated by the spec, disable timer around transitions.
From code by : Ken Staton <ken_staton@agilent.com
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/longhaul.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index 8ea545e35b3a..48899f0956f7 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c @@ -120,9 +120,10 @@ static int longhaul_get_cpu_mult(void) static void do_powersaver(union msr_longhaul *longhaul, unsigned int clock_ratio_index) { - int version; - unsigned long flags; struct pci_dev *dev; + unsigned long flags; + unsigned int tmp_mask; + int version; int i; u16 pci_cmd; u16 cmd_state[64]; @@ -163,6 +164,10 @@ static void do_powersaver(union msr_longhaul *longhaul, } } while (dev != NULL); + tmp_mask=inb(0x21); /* works on C3. save mask. */ + outb(0xFE,0x21); /* TMR0 only */ + outb(0xFF,0x80); /* delay */ + local_irq_enable(); __hlt(); @@ -171,6 +176,8 @@ static void do_powersaver(union msr_longhaul *longhaul, local_irq_disable(); + outb(tmp_mask,0x21); /* restore mask */ + /* restore pci bus master state for all devices */ dev = NULL; i = 0; |