All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Myhr <fmyhr@fhmtech.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 2/2] hwmon (hwmon-vid): add 6-bit vid codes
Date: Mon, 23 Jun 2008 16:06:26 +0000	[thread overview]
Message-ID: <485FCA02.3000909@fhmtech.com> (raw)
In-Reply-To: <48508DAE.8040401@fhmtech.com>

Jean,

Thanks for your comments. Sorry for my slow response, I was on vacation and
then have been getting my head around quilt. Anyway, I think the below patch
fixes the problems you noticed.

Signed-off-by: Frank Myhr <fmyhr@fhmtech.com>
---

Index: linux/drivers/hwmon/hwmon-vid.c
=================================--- linux.orig/drivers/hwmon/hwmon-vid.c	2008-06-23 10:27:37.000000000 -0400
+++ linux/drivers/hwmon/hwmon-vid.c	2008-06-23 11:29:35.000000000 -0400
@@ -37,18 +37,14 @@
  * For VRD 10.0 and up, "VRD x.y Design Guide",
  * available at http://developer.intel.com/.
  *
+ * AMD NPT 0Fh (Athlon64 & Opteron), AMD Publication 32559,
+ * http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf
+ * Table 71. VID Code Voltages
  * AMD Opteron processors don't follow the Intel specifications.
  * I'm going to "make up" 2.4 as the spec number for the Opterons.
  * No good reason just a mnemonic for the 24x Opteron processor
  * series.
  *
- * Opteron VID encoding is:
- *    00000  =  1.550 V
- *    00001  =  1.525 V
- *     . . . .
- *    11110  =  0.800 V
- *    11111  =  0.000 V (off)
- *
  * The 17 specification is in fact Intel Mobile Voltage Positioning -
  * (IMVP-II). You can find more information in the datasheet of Max1718
  * http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2452
@@ -98,9 +94,11 @@
 		if (val < 0x02 || val > 0xb2)
 			return 0;
 		return((1600000 - (val - 2) * 6250 + 500) / 1000);
-	case 24:                /* Opteron processor */
-		val &= 0x1f;
-		return(val = 0x1f ? 0 : 1550 - val * 25);
+
+	case 24:		/* AMD NPT 0Fh (Athlon64 & Opteron) */
+		val &= 0x3f;
+		return (val < 32) ? 1550 - 25 * val
+			: 775 - (25 * (val - 31)) / 2;

 	case 91:		/* VRM 9.1 */
 	case 90:		/* VRM 9.0 */

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2008-06-23 16:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12  2:45 [lm-sensors] [PATCH 2/2] hwmon (hwmon-vid): add 6-bit vid codes for Frank Myhr
2008-06-16  8:47 ` [lm-sensors] [PATCH 2/2] hwmon (hwmon-vid): add 6-bit vid codes Jean Delvare
2008-06-23 16:06 ` Frank Myhr [this message]
2008-06-23 16:18 ` Jean Delvare
2008-08-14 11:43 ` Jean Delvare
2008-08-14 23:59 ` Frank Myhr
2008-08-15  7:48 ` Jean Delvare

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=485FCA02.3000909@fhmtech.com \
    --to=fmyhr@fhmtech.com \
    --cc=lm-sensors@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.