Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209995
b: refs/heads/master
c: a05e93f
h: refs/heads/master
i:
  209993: 54e9c53
  209991: e591017
v: v3
  • Loading branch information
Andreas Herrmann authored and Jean Delvare committed Aug 25, 2010
1 parent f6ee364 commit 0b30d2a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c12c507d7185fe4e8ada7ed9832957576eefecf8
refs/heads/master: a05e93f3b3fc2f53c1d0de3b17019e207c482349
35 changes: 32 additions & 3 deletions trunk/drivers/hwmon/k8temp.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,37 @@ static const struct pci_device_id k8temp_ids[] = {

MODULE_DEVICE_TABLE(pci, k8temp_ids);

static int __devinit is_rev_g_desktop(u8 model)
{
u32 brandidx;

if (model < 0x69)
return 0;

if (model == 0xc1 || model == 0x6c || model == 0x7c)
return 0;

/*
* Differentiate between AM2 and ASB1.
* See "Constructing the processor Name String" in "Revision
* Guide for AMD NPT Family 0Fh Processors" (33610).
*/
brandidx = cpuid_ebx(0x80000001);
brandidx = (brandidx >> 9) & 0x1f;

/* Single core */
if ((model == 0x6f || model == 0x7f) &&
(brandidx == 0x7 || brandidx == 0x9 || brandidx == 0xc))
return 0;

/* Dual core */
if (model == 0x6b &&
(brandidx == 0xb || brandidx == 0xc))
return 0;

return 1;
}

static int __devinit k8temp_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
Expand Down Expand Up @@ -179,9 +210,7 @@ static int __devinit k8temp_probe(struct pci_dev *pdev,
"wrong - check erratum #141\n");
}

if ((model >= 0x69) &&
!(model == 0xc1 || model == 0x6c || model == 0x7c ||
model == 0x6b || model == 0x6f || model == 0x7f)) {
if (is_rev_g_desktop(model)) {
/*
* RevG desktop CPUs (i.e. no socket S1G1 or
* ASB1 parts) need additional offset,
Expand Down

0 comments on commit 0b30d2a

Please sign in to comment.