Author: kib
Date: Thu Feb 13 19:07:42 2020
New Revision: 357868
URL: https://svnweb.freebsd.org/changeset/base/357868

Log:
  amdpm: Add Hygon Dhyana support.
  
  Submitted by: Pu Wen <pu...@hygon.cn>
  MFC after:    1 week
  Differential revision:        https://reviews.freebsd.org/D23557

Modified:
  head/sys/dev/amdpm/amdpm.c

Modified: head/sys/dev/amdpm/amdpm.c
==============================================================================
--- head/sys/dev/amdpm/amdpm.c  Thu Feb 13 19:05:19 2020        (r357867)
+++ head/sys/dev/amdpm/amdpm.c  Thu Feb 13 19:07:42 2020        (r357868)
@@ -67,6 +67,8 @@ static int amdpm_debug = 0;
 #define AMDPM_DEVICEID_AMD768PM 0x7443
 #define AMDPM_DEVICEID_AMD8111PM 0x746B
 
+#define AMDPM_VENDORID_HYGON 0x1d94
+
 /* nVidia nForce chipset */
 #define AMDPM_VENDORID_NVIDIA 0x10de
 #define AMDPM_DEVICEID_NF_SMB 0x01b4
@@ -199,7 +201,8 @@ amdpm_attach(device_t dev)
        pci_write_config(dev, AMDPCI_GEN_CONFIG_PM, val_b | AMDPCI_PMIOEN, 1);
 
        /* Allocate I/O space */
-       if (pci_get_vendor(dev) == AMDPM_VENDORID_AMD)
+       if (pci_get_vendor(dev) == AMDPM_VENDORID_AMD ||
+           pci_get_vendor(dev) == AMDPM_VENDORID_HYGON)
                amdpm_sc->rid = AMDPCI_PMBASE;
        else
                amdpm_sc->rid = NFPCI_PMBASE;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to