diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 7 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/longhaul.c | 56 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | 2 |
3 files changed, 41 insertions, 24 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index ea19d091fd41..57c880bf0bd6 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -396,13 +396,13 @@ static int acpi_cpufreq_early_init_acpi(void) | |||
396 | */ | 396 | */ |
397 | static int bios_with_sw_any_bug; | 397 | static int bios_with_sw_any_bug; |
398 | 398 | ||
399 | static int __init sw_any_bug_found(struct dmi_system_id *d) | 399 | static int sw_any_bug_found(struct dmi_system_id *d) |
400 | { | 400 | { |
401 | bios_with_sw_any_bug = 1; | 401 | bios_with_sw_any_bug = 1; |
402 | return 0; | 402 | return 0; |
403 | } | 403 | } |
404 | 404 | ||
405 | static struct dmi_system_id __initdata sw_any_bug_dmi_table[] = { | 405 | static struct dmi_system_id sw_any_bug_dmi_table[] = { |
406 | { | 406 | { |
407 | .callback = sw_any_bug_found, | 407 | .callback = sw_any_bug_found, |
408 | .ident = "Supermicro Server X6DLP", | 408 | .ident = "Supermicro Server X6DLP", |
@@ -597,7 +597,6 @@ static struct cpufreq_driver acpi_cpufreq_driver = { | |||
597 | .name = "acpi-cpufreq", | 597 | .name = "acpi-cpufreq", |
598 | .owner = THIS_MODULE, | 598 | .owner = THIS_MODULE, |
599 | .attr = acpi_cpufreq_attr, | 599 | .attr = acpi_cpufreq_attr, |
600 | .flags = CPUFREQ_STICKY, | ||
601 | }; | 600 | }; |
602 | 601 | ||
603 | 602 | ||
@@ -608,7 +607,7 @@ acpi_cpufreq_init (void) | |||
608 | 607 | ||
609 | acpi_cpufreq_early_init_acpi(); | 608 | acpi_cpufreq_early_init_acpi(); |
610 | 609 | ||
611 | return cpufreq_register_driver(&acpi_cpufreq_driver); | 610 | return cpufreq_register_driver(&acpi_cpufreq_driver); |
612 | } | 611 | } |
613 | 612 | ||
614 | 613 | ||
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index f5cc9f5c9bab..7233abe5d695 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -178,11 +178,17 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index) | |||
178 | safe_halt(); | 178 | safe_halt(); |
179 | /* Change frequency on next halt or sleep */ | 179 | /* Change frequency on next halt or sleep */ |
180 | wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); | 180 | wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); |
181 | ACPI_FLUSH_CPU_CACHE(); | 181 | if (port22_en) { |
182 | /* Invoke C3 */ | 182 | ACPI_FLUSH_CPU_CACHE(); |
183 | inb(cx_address); | 183 | /* Invoke C1 */ |
184 | /* Dummy op - must do something useless after P_LVL3 read */ | 184 | halt(); |
185 | t = inl(acpi_fadt.xpm_tmr_blk.address); | 185 | } else { |
186 | ACPI_FLUSH_CPU_CACHE(); | ||
187 | /* Invoke C3 */ | ||
188 | inb(cx_address); | ||
189 | /* Dummy op - must do something useless after P_LVL3 read */ | ||
190 | t = inl(acpi_fadt.xpm_tmr_blk.address); | ||
191 | } | ||
186 | 192 | ||
187 | /* Disable bus ratio bit */ | 193 | /* Disable bus ratio bit */ |
188 | local_irq_disable(); | 194 | local_irq_disable(); |
@@ -567,16 +573,23 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle, | |||
567 | static int enable_arbiter_disable(void) | 573 | static int enable_arbiter_disable(void) |
568 | { | 574 | { |
569 | struct pci_dev *dev; | 575 | struct pci_dev *dev; |
576 | int reg; | ||
570 | u8 pci_cmd; | 577 | u8 pci_cmd; |
571 | 578 | ||
572 | /* Find PLE133 host bridge */ | 579 | /* Find PLE133 host bridge */ |
580 | reg = 0x78; | ||
573 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL); | 581 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL); |
582 | /* Find CLE266 host bridge */ | ||
583 | if (dev == NULL) { | ||
584 | reg = 0x76; | ||
585 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL); | ||
586 | } | ||
574 | if (dev != NULL) { | 587 | if (dev != NULL) { |
575 | /* Enable access to port 0x22 */ | 588 | /* Enable access to port 0x22 */ |
576 | pci_read_config_byte(dev, 0x78, &pci_cmd); | 589 | pci_read_config_byte(dev, reg, &pci_cmd); |
577 | if ( !(pci_cmd & 1<<7) ) { | 590 | if ( !(pci_cmd & 1<<7) ) { |
578 | pci_cmd |= 1<<7; | 591 | pci_cmd |= 1<<7; |
579 | pci_write_config_byte(dev, 0x78, pci_cmd); | 592 | pci_write_config_byte(dev, reg, pci_cmd); |
580 | } | 593 | } |
581 | return 1; | 594 | return 1; |
582 | } | 595 | } |
@@ -680,20 +693,25 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy) | |||
680 | if (longhaul_version == TYPE_POWERSAVER) { | 693 | if (longhaul_version == TYPE_POWERSAVER) { |
681 | /* Check ACPI support for C3 state */ | 694 | /* Check ACPI support for C3 state */ |
682 | cx = &pr->power.states[ACPI_STATE_C3]; | 695 | cx = &pr->power.states[ACPI_STATE_C3]; |
683 | if (cx->address == 0 || | 696 | if (cx->address > 0 && |
684 | (cx->latency > 1000 && ignore_latency == 0) ) | 697 | (cx->latency <= 1000 || ignore_latency != 0) ) { |
698 | goto print_support_type; | ||
699 | } | ||
700 | } | ||
701 | /* Check ACPI support for bus master arbiter disable */ | ||
702 | if (!pr->flags.bm_control) { | ||
703 | if (enable_arbiter_disable()) { | ||
704 | port22_en = 1; | ||
705 | } else { | ||
685 | goto err_acpi; | 706 | goto err_acpi; |
686 | |||
687 | } else { | ||
688 | /* Check ACPI support for bus master arbiter disable */ | ||
689 | if (!pr->flags.bm_control) { | ||
690 | if (!enable_arbiter_disable()) { | ||
691 | printk(KERN_ERR PFX "No ACPI support. No VT8601 host bridge. Aborting.\n"); | ||
692 | return -ENODEV; | ||
693 | } else | ||
694 | port22_en = 1; | ||
695 | } | 707 | } |
696 | } | 708 | } |
709 | print_support_type: | ||
710 | if (!port22_en) { | ||
711 | printk (KERN_INFO PFX "Using ACPI support.\n"); | ||
712 | } else { | ||
713 | printk (KERN_INFO PFX "Using northbridge support.\n"); | ||
714 | } | ||
697 | 715 | ||
698 | ret = longhaul_get_ranges(); | 716 | ret = longhaul_get_ranges(); |
699 | if (ret != 0) | 717 | if (ret != 0) |
@@ -716,7 +734,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy) | |||
716 | return 0; | 734 | return 0; |
717 | 735 | ||
718 | err_acpi: | 736 | err_acpi: |
719 | printk(KERN_ERR PFX "No ACPI support for CPU frequency changes.\n"); | 737 | printk(KERN_ERR PFX "No ACPI support. No VT8601 or VT8623 northbridge. Aborting.\n"); |
720 | return -ENODEV; | 738 | return -ENODEV; |
721 | } | 739 | } |
722 | 740 | ||
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index 7a9325349e94..e8993baf3d14 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -386,7 +386,7 @@ static int centrino_cpu_early_init_acpi(void) | |||
386 | * than OS intended it to run at. Detect it and handle it cleanly. | 386 | * than OS intended it to run at. Detect it and handle it cleanly. |
387 | */ | 387 | */ |
388 | static int bios_with_sw_any_bug; | 388 | static int bios_with_sw_any_bug; |
389 | static int __init sw_any_bug_found(struct dmi_system_id *d) | 389 | static int sw_any_bug_found(struct dmi_system_id *d) |
390 | { | 390 | { |
391 | bios_with_sw_any_bug = 1; | 391 | bios_with_sw_any_bug = 1; |
392 | return 0; | 392 | return 0; |