aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorRafaƂ Bilski <rafalbilski@interia.pl>2007-05-17 16:33:46 -0400
committerDave Jones <davej@redhat.com>2007-05-29 16:56:39 -0400
commit7d5edcc028f1bed2542a96edc2356e484f01ee47 (patch)
treebbf2fcaa33801c03891ce77a2ba0c3574a884f7d /arch/i386
parent904f7a3f042b5c6aa9e53ce83f2c9de5e33170ff (diff)
[CPUFREQ] Longhaul - Use all kinds of support
This patch is removing southbridge support as separate kind of support. Instead it is used to make other kinds of support more stable. Also northbridge and ACPI C3 support both will be used if both are available. Signed-off-by: Rafal Bilski <rafalbilski@interia.pl> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index a3df9c039bd4..f85cff4ebba5 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -55,7 +55,6 @@
55/* Flags */ 55/* Flags */
56#define USE_ACPI_C3 (1 << 1) 56#define USE_ACPI_C3 (1 << 1)
57#define USE_NORTHBRIDGE (1 << 2) 57#define USE_NORTHBRIDGE (1 << 2)
58#define USE_VT8235 (1 << 3)
59 58
60static int cpu_model; 59static int cpu_model;
61static unsigned int numscales=16; 60static unsigned int numscales=16;
@@ -627,7 +626,7 @@ static int enable_arbiter_disable(void)
627 return 0; 626 return 0;
628} 627}
629 628
630static int longhaul_setup_vt8235(void) 629static int longhaul_setup_southbridge(void)
631{ 630{
632 struct pci_dev *dev; 631 struct pci_dev *dev;
633 u8 pci_cmd; 632 u8 pci_cmd;
@@ -657,7 +656,6 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
657 char *cpuname=NULL; 656 char *cpuname=NULL;
658 int ret; 657 int ret;
659 u32 lo, hi; 658 u32 lo, hi;
660 int vt8235_present;
661 659
662 /* Check what we have on this motherboard */ 660 /* Check what we have on this motherboard */
663 switch (c->x86_model) { 661 switch (c->x86_model) {
@@ -755,7 +753,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
755 }; 753 };
756 754
757 /* Doesn't hurt */ 755 /* Doesn't hurt */
758 vt8235_present = longhaul_setup_vt8235(); 756 longhaul_setup_southbridge();
759 757
760 /* Find ACPI data for processor */ 758 /* Find ACPI data for processor */
761 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, 759 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
@@ -765,35 +763,26 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
765 /* Check ACPI support for C3 state */ 763 /* Check ACPI support for C3 state */
766 if (pr != NULL && longhaul_version == TYPE_POWERSAVER) { 764 if (pr != NULL && longhaul_version == TYPE_POWERSAVER) {
767 cx = &pr->power.states[ACPI_STATE_C3]; 765 cx = &pr->power.states[ACPI_STATE_C3];
768 if (cx->address > 0 && cx->latency <= 1000) { 766 if (cx->address > 0 && cx->latency <= 1000)
769 longhaul_flags |= USE_ACPI_C3; 767 longhaul_flags |= USE_ACPI_C3;
770 goto print_support_type;
771 }
772 } 768 }
773 /* Check if northbridge is friendly */ 769 /* Check if northbridge is friendly */
774 if (enable_arbiter_disable()) { 770 if (enable_arbiter_disable())
775 longhaul_flags |= USE_NORTHBRIDGE; 771 longhaul_flags |= USE_NORTHBRIDGE;
776 goto print_support_type; 772
777 }
778 /* Use VT8235 southbridge if present */
779 if (longhaul_version == TYPE_POWERSAVER && vt8235_present) {
780 longhaul_flags |= USE_VT8235;
781 goto print_support_type;
782 }
783 /* Check ACPI support for bus master arbiter disable */ 773 /* Check ACPI support for bus master arbiter disable */
784 if ((pr == NULL) || !(pr->flags.bm_control)) { 774 if (!(longhaul_flags & USE_ACPI_C3
775 || longhaul_flags & USE_NORTHBRIDGE)
776 && ((pr == NULL) || !(pr->flags.bm_control))) {
785 printk(KERN_ERR PFX 777 printk(KERN_ERR PFX
786 "No ACPI support. Unsupported northbridge.\n"); 778 "No ACPI support. Unsupported northbridge.\n");
787 return -ENODEV; 779 return -ENODEV;
788 } 780 }
789 781
790print_support_type:
791 if (longhaul_flags & USE_NORTHBRIDGE) 782 if (longhaul_flags & USE_NORTHBRIDGE)
792 printk (KERN_INFO PFX "Using northbridge support.\n"); 783 printk(KERN_INFO PFX "Using northbridge support.\n");
793 else if (longhaul_flags & USE_VT8235) 784 if (longhaul_flags & USE_ACPI_C3)
794 printk (KERN_INFO PFX "Using VT8235 support.\n"); 785 printk(KERN_INFO PFX "Using ACPI support.\n");
795 else
796 printk (KERN_INFO PFX "Using ACPI support.\n");
797 786
798 ret = longhaul_get_ranges(); 787 ret = longhaul_get_ranges();
799 if (ret != 0) 788 if (ret != 0)