]> err.no Git - linux-2.6/commitdiff
[CPUFREQ] Support different families in fid/did to frequency conversion
authorMark Langsdorf <mark.langsdorf@amd.com>
Fri, 3 Aug 2007 19:09:05 +0000 (14:09 -0500)
committerDave Jones <davej@redhat.com>
Thu, 4 Oct 2007 22:40:57 +0000 (18:40 -0400)
The equation to find the frequency given the fid and did is family dependant.

Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Joachim Deguara <joachim.deguara@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
arch/i386/kernel/cpu/cpufreq/powernow-k8.c

index f2a65a9609f10a66375ab476a67f0c15ab4c7df0..b273b69cfddf0532d18b4db6646fafd077cdc31e 100644 (file)
@@ -76,7 +76,10 @@ static u32 find_khz_freq_from_fid(u32 fid)
 /* Return a frequency in MHz, given an input fid and did */
 static u32 find_freq_from_fiddid(u32 fid, u32 did)
 {
-       return 100 * (fid + 0x10) >> did;
+       if (current_cpu_data.x86 == 0x10)
+               return 100 * (fid + 0x10) >> did;
+       else
+               return 100 * (fid + 0x8) >> did;
 }
 
 static u32 find_khz_freq_from_fiddid(u32 fid, u32 did)