cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Support different families in fid/did to frequency conversion
@ 2007-08-03 19:09 Mark Langsdorf
  0 siblings, 0 replies; only message in thread
From: Mark Langsdorf @ 2007-08-03 19:09 UTC (permalink / raw)
  To: cpufreq, bhavana.nagendra

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>

--
Index: 2.6-git/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
===================================================================
--- 2.6-git.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-03 19:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-03 19:09 [PATCH] Support different families in fid/did to frequency conversion Mark Langsdorf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox