diff options
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/longhaul.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index 504c6c9107d5..ff4829666472 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -254,6 +254,8 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
254 | struct cpufreq_freqs freqs; | 254 | struct cpufreq_freqs freqs; |
255 | unsigned long flags; | 255 | unsigned long flags; |
256 | unsigned int pic1_mask, pic2_mask; | 256 | unsigned int pic1_mask, pic2_mask; |
257 | u32 bm_status = 0; | ||
258 | u32 bm_timeout = 100000; | ||
257 | 259 | ||
258 | if (old_ratio == clock_ratio_index) | 260 | if (old_ratio == clock_ratio_index) |
259 | return; | 261 | return; |
@@ -284,6 +286,18 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
284 | outb(0xFF,0xA1); /* Overkill */ | 286 | outb(0xFF,0xA1); /* Overkill */ |
285 | outb(0xFE,0x21); /* TMR0 only */ | 287 | outb(0xFE,0x21); /* TMR0 only */ |
286 | 288 | ||
289 | /* Wait while PCI bus is busy. */ | ||
290 | if (longhaul_flags & USE_NORTHBRIDGE | ||
291 | || ((pr != NULL) && pr->flags.bm_control)) { | ||
292 | acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status); | ||
293 | while (bm_status && bm_timeout) { | ||
294 | acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, 1); | ||
295 | bm_timeout--; | ||
296 | acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, | ||
297 | &bm_status); | ||
298 | } | ||
299 | } | ||
300 | |||
287 | if (longhaul_flags & USE_NORTHBRIDGE) { | 301 | if (longhaul_flags & USE_NORTHBRIDGE) { |
288 | /* Disable AGP and PCI arbiters */ | 302 | /* Disable AGP and PCI arbiters */ |
289 | outb(3, 0x22); | 303 | outb(3, 0x22); |
@@ -335,6 +349,10 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
335 | 349 | ||
336 | freqs.new = calc_speed(longhaul_get_cpu_mult()); | 350 | freqs.new = calc_speed(longhaul_get_cpu_mult()); |
337 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 351 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
352 | |||
353 | if (!bm_timeout) | ||
354 | printk(KERN_INFO PFX "Warning: Timeout while waiting for " | ||
355 | "idle PCI bus.\n"); | ||
338 | } | 356 | } |
339 | 357 | ||
340 | /* | 358 | /* |