2018-04-29 16:17:20

by Guenter Roeck

[permalink] [raw]
Subject: [PATCH] hwmon: (k10temp) Add support for Stoney Ridge and Bristol Ridge CPUs

Add support for Stoney Ridge and Bristol Ridge (Family 15h Model 0x70)
CPUs. Registers match those of Family 15h Model 0x60.

Signed-off-by: Guenter Roeck <[email protected]>
---
drivers/hwmon/k10temp.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index 34b5448b00be..f014e03eee5a 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -36,6 +36,10 @@ MODULE_PARM_DESC(force, "force loading on processors with erratum 319");
/* Provide lock for writing to NB_SMU_IND_ADDR */
static DEFINE_MUTEX(nb_smu_ind_mutex);

+#ifndef PCI_DEVICE_ID_AMD_15H_M70H_NB_F3
+#define PCI_DEVICE_ID_AMD_15H_M70H_NB_F3 0x15b3
+#endif
+
#ifndef PCI_DEVICE_ID_AMD_17H_DF_F3
#define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
#endif
@@ -319,6 +323,7 @@ static const struct pci_device_id k10temp_id_table[] = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M70H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
--
2.7.4



2018-04-29 16:31:17

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH] hwmon: (k10temp) Add support for Stoney Ridge and Bristol Ridge CPUs

On 04/29/2018 09:28 AM, Gabriel C wrote:
> 2018-04-29 18:16 GMT+02:00 Guenter Roeck <[email protected]>:
>> Add support for Stoney Ridge and Bristol Ridge (Family 15h Model 0x70)
>> CPUs. Registers match those of Family 15h Model 0x60.
>>
>> Signed-off-by: Guenter Roeck <[email protected]>
>> ---
>> drivers/hwmon/k10temp.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
>> index 34b5448b00be..f014e03eee5a 100644
>> --- a/drivers/hwmon/k10temp.c
>> +++ b/drivers/hwmon/k10temp.c
>> @@ -36,6 +36,10 @@ MODULE_PARM_DESC(force, "force loading on processors with erratum 319");
>> /* Provide lock for writing to NB_SMU_IND_ADDR */
>> static DEFINE_MUTEX(nb_smu_ind_mutex);
>>
>> +#ifndef PCI_DEVICE_ID_AMD_15H_M70H_NB_F3
>> +#define PCI_DEVICE_ID_AMD_15H_M70H_NB_F3 0x15b3
>> +#endif
>> +
>> #ifndef PCI_DEVICE_ID_AMD_17H_DF_F3
>> #define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
>> #endif
>> @@ -319,6 +323,7 @@ static const struct pci_device_id k10temp_id_table[] = {
>> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) },
>> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) },
>> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F3) },
>> + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M70H_NB_F3) },
>> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
>> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
>> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
>> --
>> 2.7.4
>>
>
> Is working fine for me on an A6-9220 APU.
>
> Tested-by: Gabriel Craciunescu <[email protected]>
>
Thanks again!

Guenter


2018-04-29 16:31:40

by Gabriel C

[permalink] [raw]
Subject: Re: [PATCH] hwmon: (k10temp) Add support for Stoney Ridge and Bristol Ridge CPUs

2018-04-29 18:16 GMT+02:00 Guenter Roeck <[email protected]>:
> Add support for Stoney Ridge and Bristol Ridge (Family 15h Model 0x70)
> CPUs. Registers match those of Family 15h Model 0x60.
>
> Signed-off-by: Guenter Roeck <[email protected]>
> ---
> drivers/hwmon/k10temp.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
> index 34b5448b00be..f014e03eee5a 100644
> --- a/drivers/hwmon/k10temp.c
> +++ b/drivers/hwmon/k10temp.c
> @@ -36,6 +36,10 @@ MODULE_PARM_DESC(force, "force loading on processors with erratum 319");
> /* Provide lock for writing to NB_SMU_IND_ADDR */
> static DEFINE_MUTEX(nb_smu_ind_mutex);
>
> +#ifndef PCI_DEVICE_ID_AMD_15H_M70H_NB_F3
> +#define PCI_DEVICE_ID_AMD_15H_M70H_NB_F3 0x15b3
> +#endif
> +
> #ifndef PCI_DEVICE_ID_AMD_17H_DF_F3
> #define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
> #endif
> @@ -319,6 +323,7 @@ static const struct pci_device_id k10temp_id_table[] = {
> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) },
> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) },
> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F3) },
> + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M70H_NB_F3) },
> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
> { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
> --
> 2.7.4
>

Is working fine for me on an A6-9220 APU.

Tested-by: Gabriel Craciunescu <[email protected]>

Regards