Commit 11746314 authored by Dave Jones's avatar Dave Jones

[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: default avatarDave Jones <davej@redhat.com>
parent 3be6a48f
...@@ -120,9 +120,10 @@ static int longhaul_get_cpu_mult(void) ...@@ -120,9 +120,10 @@ static int longhaul_get_cpu_mult(void)
static void do_powersaver(union msr_longhaul *longhaul, static void do_powersaver(union msr_longhaul *longhaul,
unsigned int clock_ratio_index) unsigned int clock_ratio_index)
{ {
int version;
unsigned long flags;
struct pci_dev *dev; struct pci_dev *dev;
unsigned long flags;
unsigned int tmp_mask;
int version;
int i; int i;
u16 pci_cmd; u16 pci_cmd;
u16 cmd_state[64]; u16 cmd_state[64];
...@@ -163,6 +164,10 @@ static void do_powersaver(union msr_longhaul *longhaul, ...@@ -163,6 +164,10 @@ static void do_powersaver(union msr_longhaul *longhaul,
} }
} while (dev != NULL); } while (dev != NULL);
tmp_mask=inb(0x21); /* works on C3. save mask. */
outb(0xFE,0x21); /* TMR0 only */
outb(0xFF,0x80); /* delay */
local_irq_enable(); local_irq_enable();
__hlt(); __hlt();
...@@ -171,6 +176,8 @@ static void do_powersaver(union msr_longhaul *longhaul, ...@@ -171,6 +176,8 @@ static void do_powersaver(union msr_longhaul *longhaul,
local_irq_disable(); local_irq_disable();
outb(tmp_mask,0x21); /* restore mask */
/* restore pci bus master state for all devices */ /* restore pci bus master state for all devices */
dev = NULL; dev = NULL;
i = 0; i = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment