public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [v1,1/1] watchdog: sp5100_tco: support Hygon FCH/SCH (Server Controller Hub)
@ 2023-06-12  3:19 a345351830
  2023-06-12 16:38 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: a345351830 @ 2023-06-12  3:19 UTC (permalink / raw)
  To: 345351830
  Cc: amy.shih, oakley.ding, zhijun.hu, Yuechao Zhao, Wim Van Sebroeck,
	Guenter Roeck, linux-watchdog, linux-kernel

From: Yuechao Zhao <yuechao.zhao@advantech.com.cn>

Add PCI_VENDOR_ID_HYGON(Hygon vendor id [0x1d94]) in this driver

Signed-off-by: Yuechao Zhao <yuechao.zhao@advantech.com.cn>
---
 drivers/watchdog/sp5100_tco.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
index 14f8d8d90920..2bd3dc25cb03 100644
--- a/drivers/watchdog/sp5100_tco.c
+++ b/drivers/watchdog/sp5100_tco.c
@@ -96,7 +96,7 @@ static enum tco_reg_layout tco_reg_layout(struct pci_dev *dev)
 	    sp5100_tco_pci->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
 	    sp5100_tco_pci->revision >= AMD_ZEN_SMBUS_PCI_REV) {
 		return efch_mmio;
-	} else if (dev->vendor == PCI_VENDOR_ID_AMD &&
+	} else if ((dev->vendor == PCI_VENDOR_ID_AMD || dev->vendor == PCI_VENDOR_ID_HYGON) &&
 	    ((dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS &&
 	     dev->revision >= 0x41) ||
 	    (dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
@@ -579,6 +579,8 @@ static const struct pci_device_id sp5100_tco_pci_tbl[] = {
 	  PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS, PCI_ANY_ID,
 	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_HYGON, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, },
 	{ 0, },			/* End of list */
 };
 MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [v1,1/1] watchdog: sp5100_tco: support Hygon FCH/SCH (Server Controller Hub)
  2023-06-12  3:19 [v1,1/1] watchdog: sp5100_tco: support Hygon FCH/SCH (Server Controller Hub) a345351830
@ 2023-06-12 16:38 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2023-06-12 16:38 UTC (permalink / raw)
  To: a345351830, 345351830
  Cc: amy.shih, oakley.ding, zhijun.hu, Yuechao Zhao, Wim Van Sebroeck,
	linux-watchdog, linux-kernel

On 6/11/23 20:19, a345351830@gmail.com wrote:
> From: Yuechao Zhao <yuechao.zhao@advantech.com.cn>
> 
> Add PCI_VENDOR_ID_HYGON(Hygon vendor id [0x1d94]) in this driver
> 
> Signed-off-by: Yuechao Zhao <yuechao.zhao@advantech.com.cn>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/sp5100_tco.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
> index 14f8d8d90920..2bd3dc25cb03 100644
> --- a/drivers/watchdog/sp5100_tco.c
> +++ b/drivers/watchdog/sp5100_tco.c
> @@ -96,7 +96,7 @@ static enum tco_reg_layout tco_reg_layout(struct pci_dev *dev)
>   	    sp5100_tco_pci->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
>   	    sp5100_tco_pci->revision >= AMD_ZEN_SMBUS_PCI_REV) {
>   		return efch_mmio;
> -	} else if (dev->vendor == PCI_VENDOR_ID_AMD &&
> +	} else if ((dev->vendor == PCI_VENDOR_ID_AMD || dev->vendor == PCI_VENDOR_ID_HYGON) &&
>   	    ((dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS &&
>   	     dev->revision >= 0x41) ||
>   	    (dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
> @@ -579,6 +579,8 @@ static const struct pci_device_id sp5100_tco_pci_tbl[] = {
>   	  PCI_ANY_ID, },
>   	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS, PCI_ANY_ID,
>   	  PCI_ANY_ID, },
> +	{ PCI_VENDOR_ID_HYGON, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS, PCI_ANY_ID,
> +	  PCI_ANY_ID, },
>   	{ 0, },			/* End of list */
>   };
>   MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-12 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-12  3:19 [v1,1/1] watchdog: sp5100_tco: support Hygon FCH/SCH (Server Controller Hub) a345351830
2023-06-12 16:38 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox