cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Mark Langsdorf" <mark.langsdorf@amd.com>
To: cpufreq@lists.linux.org.uk, bhavana.nagendra@amd.com
Subject: [PATCH] Support different families in fid/did to frequency conversion
Date: Fri, 3 Aug 2007 14:09:05 -0500	[thread overview]
Message-ID: <200708031409.05727.mark.langsdorf@amd.com> (raw)

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)

                 reply	other threads:[~2007-08-03 19:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200708031409.05727.mark.langsdorf@amd.com \
    --to=mark.langsdorf@amd.com \
    --cc=bhavana.nagendra@amd.com \
    --cc=cpufreq@lists.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox