diff options
author | Dave Jones <davej@redhat.com> | 2005-05-31 22:03:51 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2005-05-31 22:03:51 -0400 |
commit | 1174631418fbb2c0c6946081b0b7d391f5d92861 (patch) | |
tree | 17037bd66cf4958ce3d3468f9210dbc67d1c3cbc /arch/i386/kernel | |
parent | 3be6a48f3c8df1b2fbbe57face95a03d167bda1b (diff) |
[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/i386/kernel')
-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) | |||
120 | static void do_powersaver(union msr_longhaul *longhaul, | 120 | static void do_powersaver(union msr_longhaul *longhaul, |
121 | unsigned int clock_ratio_index) | 121 | unsigned int clock_ratio_index) |
122 | { | 122 | { |
123 | int version; | ||
124 | unsigned long flags; | ||
125 | struct pci_dev *dev; | 123 | struct pci_dev *dev; |
124 | unsigned long flags; | ||
125 | unsigned int tmp_mask; | ||
126 | int version; | ||
126 | int i; | 127 | int i; |
127 | u16 pci_cmd; | 128 | u16 pci_cmd; |
128 | u16 cmd_state[64]; | 129 | u16 cmd_state[64]; |
@@ -163,6 +164,10 @@ static void do_powersaver(union msr_longhaul *longhaul, | |||
163 | } | 164 | } |
164 | } while (dev != NULL); | 165 | } while (dev != NULL); |
165 | 166 | ||
167 | tmp_mask=inb(0x21); /* works on C3. save mask. */ | ||
168 | outb(0xFE,0x21); /* TMR0 only */ | ||
169 | outb(0xFF,0x80); /* delay */ | ||
170 | |||
166 | local_irq_enable(); | 171 | local_irq_enable(); |
167 | 172 | ||
168 | __hlt(); | 173 | __hlt(); |
@@ -171,6 +176,8 @@ static void do_powersaver(union msr_longhaul *longhaul, | |||
171 | 176 | ||
172 | local_irq_disable(); | 177 | local_irq_disable(); |
173 | 178 | ||
179 | outb(tmp_mask,0x21); /* restore mask */ | ||
180 | |||
174 | /* restore pci bus master state for all devices */ | 181 | /* restore pci bus master state for all devices */ |
175 | dev = NULL; | 182 | dev = NULL; |
176 | i = 0; | 183 | i = 0; |