All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Herrmann <andreas.herrmann3@amd.com>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH 2/2] k8temp: minor fixes for CPU families 0x10
Date: Tue, 18 Nov 2008 08:46:46 +0000	[thread overview]
Message-ID: <20081118084646.GE12095@alberich.amd.com> (raw)


 - correct address for "Reported Temperature Control Register"
 - correct Tctl_max for family 0x11

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
---
 drivers/hwmon/k8temp.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/hwmon/k8temp.c b/drivers/hwmon/k8temp.c
index a949a86..fa30f8b 100644
--- a/drivers/hwmon/k8temp.c
+++ b/drivers/hwmon/k8temp.c
@@ -37,7 +37,7 @@
 #define FAM_10_TEMP_FROM_REG(val)	(((val) >> 21) * 125)
 
 #define FAM_F_REG_TEMP	0xe4
-#define FAM_10_REG_TEMP	0xa5
+#define FAM_10_REG_TEMP	0xa4
 
 #define REG_CPUID	0xfc
 /* real bitpos */
@@ -196,9 +196,15 @@ static int __devinit setup_fam_10(struct pci_dev *pdev, struct k8temp_data *data
 {
 	/* we need max temp */
 	data->sensorsp = SEL_TEMPMAX;
-	data->tcontrol_max = 70000;
 
-	data->name = (data->fam  = 0x11) ? "fam11temp" : "fam10temp";
+	if (data->fam = 0x10) {
+		data->name = "fam10temp";
+		data->tcontrol_max = 70000;
+	} else if (data->fam = 0x11) {
+		data->name = "fam11temp";
+		data->tcontrol_max = 100000;
+	} else
+		BUG();
 
 	return 0;
 }
-- 
1.6.0.3





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

                 reply	other threads:[~2008-11-18  8:46 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=20081118084646.GE12095@alberich.amd.com \
    --to=andreas.herrmann3@amd.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.