Skip to contentSkip to conversation

Support different families in fid/did to frequency conversion

PATCH New Mark Langsdorf 1 participant 1 message Aug 3, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Support different families in fid/did to frequency conversion

The equation to find the frequency given the fid and did is family dependant.

--

arch/i386/kernel/cpu/cpufreq/powernow-k8.c +4 -1
Index: 2.6-git/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
===================================================================
@@ -76,7 +76,10 @@ static u32 find_khz_freq_from_fid(u32 fi
 /* 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)