Add support for Hygon NTB PCI device in ntb_hw_amd driver.

Submitted by:	Pu Wen <puwen@hygon.cn>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23565
This commit is contained in:
mav 2020-02-14 15:04:56 +00:00
parent 652cbc5d92
commit 0e2fc41103
2 changed files with 17 additions and 1 deletions

View File

@ -101,6 +101,16 @@ static const struct amd_ntb_hw_info amd_ntb_hw_info_list[] = {
.msix_vector_count = 24,
.quirks = 0,
.desc = "AMD Non-Transparent Bridge"},
{ .vendor_id = NTB_HW_HYGON_VENDOR_ID,
.device_id = NTB_HW_HYGON_DEVICE_ID1,
.mw_count = 3,
.bar_start_idx = 1,
.spad_count = 16,
.db_count = 16,
.msix_vector_count = 24,
.quirks = QUIRK_MW0_32BIT,
.desc = "Hygon Non-Transparent Bridge"},
};
static const struct pci_device_table amd_ntb_devs[] = {
@ -109,7 +119,10 @@ static const struct pci_device_table amd_ntb_devs[] = {
PCI_DESCR("AMD Non-Transparent Bridge") },
{ PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID2),
.driver_data = (uintptr_t)&amd_ntb_hw_info_list[1],
PCI_DESCR("AMD Non-Transparent Bridge") }
PCI_DESCR("AMD Non-Transparent Bridge") },
{ PCI_DEV(NTB_HW_HYGON_VENDOR_ID, NTB_HW_HYGON_DEVICE_ID1),
.driver_data = (uintptr_t)&amd_ntb_hw_info_list[0],
PCI_DESCR("Hygon Non-Transparent Bridge") }
};
static unsigned g_amd_ntb_hw_debug_level;

View File

@ -51,6 +51,9 @@
#define NTB_HW_AMD_DEVICE_ID1 0x145B
#define NTB_HW_AMD_DEVICE_ID2 0x148B
#define NTB_HW_HYGON_VENDOR_ID 0x19D4
#define NTB_HW_HYGON_DEVICE_ID1 0x145B
#define NTB_DEF_PEER_CNT 1
#define NTB_DEF_PEER_IDX 0