public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Trek <trek00@inbox.ru>
To: linux-hwmon@vger.kernel.org
Subject: fam15h_power on a4-4000?
Date: Sun, 27 Mar 2016 20:13:40 +0200	[thread overview]
Message-ID: <20160327201340.152ff142@enterprise> (raw)

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

reading the specs, it seems to me that the a4-4000 processor (amd fam
15h model 13h) has the tdp running average feature, implemented in
the fam15h_power module:

  D18F5xE0, page 456, BKDG for AMD Family 15h Models 10h-1Fh Processors
  http://support.amd.com/TechDocs/42300_15h_Mod_10h-1Fh_BKDG.pdf

if this assumption is correct, the module fails to probe the device
only because the pci id to query is different, so the attached patch
should fix the detection

it is untested as i'm not familiar with the hardware and i really
appreciate some suggestion from an expert here

c-ya!

[-- Attachment #2: fam15h_power-10h.diff --]
[-- Type: text/x-patch, Size: 1230 bytes --]

diff -ur linux/drivers/hwmon/fam15h_power.c linux-fam15h_power-10h/drivers/hwmon/fam15h_power.c
--- linux/drivers/hwmon/fam15h_power.c	2016-03-27 19:54:32.176763010 +0200
+++ linux-fam15h_power-10h/drivers/hwmon/fam15h_power.c	2016-03-27 20:00:02.048765885 +0200
@@ -304,6 +304,7 @@
 
 static const struct pci_device_id fam15h_power_id_table[] = {
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
+	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_NB_F4) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F4) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F4) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M70H_NB_F4) },
diff -ur linux/include/linux/pci_ids.h linux-fam15h_power-10h/include/linux/pci_ids.h
--- linux/include/linux/pci_ids.h	2016-03-27 19:55:45.768763651 +0200
+++ linux-fam15h_power-10h/include/linux/pci_ids.h	2016-03-27 20:00:22.724766065 +0200
@@ -521,6 +521,7 @@
 #define PCI_DEVICE_ID_AMD_11H_NB_MISC	0x1303
 #define PCI_DEVICE_ID_AMD_11H_NB_LINK	0x1304
 #define PCI_DEVICE_ID_AMD_15H_M10H_F3	0x1403
+#define PCI_DEVICE_ID_AMD_15H_M10H_NB_F4 0x1404
 #define PCI_DEVICE_ID_AMD_15H_M30H_NB_F3 0x141d
 #define PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 0x141e
 #define PCI_DEVICE_ID_AMD_15H_M60H_NB_F3 0x1573

             reply	other threads:[~2016-03-27 18:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-27 18:13 Trek [this message]
2016-03-27 18:51 ` fam15h_power on a4-4000? Guenter Roeck
2016-03-28  2:19   ` Huang Rui
2016-03-28 21:04     ` Trek

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=20160327201340.152ff142@enterprise \
    --to=trek00@inbox.ru \
    --cc=linux-hwmon@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox