Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59201
b: refs/heads/master
c: 489dc5c
h: refs/heads/master
i:
  59199: 3e51da3
v: v3
  • Loading branch information
Rafał Bilski authored and Dave Jones committed May 29, 2007
1 parent 5d59d2e commit 8fc719e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b11d4ca6d9d7ea3ace9d241e52cc5fe3cfe3d8f
refs/heads/master: 489dc5cb18932d3cedaef03e84890475db17a843
18 changes: 18 additions & 0 deletions trunk/arch/i386/kernel/cpu/cpufreq/longhaul.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
struct cpufreq_freqs freqs;
unsigned long flags;
unsigned int pic1_mask, pic2_mask;
u32 bm_status = 0;
u32 bm_timeout = 100000;

if (old_ratio == clock_ratio_index)
return;
Expand Down Expand Up @@ -284,6 +286,18 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
outb(0xFF,0xA1); /* Overkill */
outb(0xFE,0x21); /* TMR0 only */

/* Wait while PCI bus is busy. */
if (longhaul_flags & USE_NORTHBRIDGE
|| ((pr != NULL) && pr->flags.bm_control)) {
acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status);
while (bm_status && bm_timeout) {
acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, 1);
bm_timeout--;
acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS,
&bm_status);
}
}

if (longhaul_flags & USE_NORTHBRIDGE) {
/* Disable AGP and PCI arbiters */
outb(3, 0x22);
Expand Down Expand Up @@ -335,6 +349,10 @@ static void longhaul_setstate(unsigned int clock_ratio_index)

freqs.new = calc_speed(longhaul_get_cpu_mult());
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);

if (!bm_timeout)
printk(KERN_INFO PFX "Warning: Timeout while waiting for "
"idle PCI bus.\n");
}

/*
Expand Down

0 comments on commit 8fc719e

Please sign in to comment.