pci: add pci endpoint test driver

Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
This commit is contained in:
yezhonghui
2024-07-18 09:50:28 +08:00
committed by Xiang Xiao
parent 9a84484df5
commit f6db814804
8 changed files with 903 additions and 0 deletions
+4
View File
@@ -54,6 +54,10 @@ if(CONFIG_PCI_ENDPOINT)
list(APPEND SRCS pci_epf_test.c)
endif() # CONFIG_PCI_EPF_TEST
if(CONFIG_PCI_EP_TEST)
list(APPEND SRCS pci_ep_test.c)
endif() # CONFIG_PCI_ENDPOINT_TEST
target_sources(drivers PRIVATE ${SRCS})
endif() # CONFIG_PCI_ENDPOINT
+5
View File
@@ -95,5 +95,10 @@ config PCI_EPF_TEST
---help---
pci epf test driver
config PCI_EP_TEST
bool "PCI endpoint test"
---help---
pci endpoint test driver
endif # PCI_ENDPOINT
+4
View File
@@ -49,6 +49,10 @@ ifeq ($(CONFIG_PCI_EPF_TEST),y)
CSRCS += pci_epf_test.c
endif
ifeq ($(CONFIG_PCI_EP_TEST),y)
CSRCS += pci_ep_test.c
endif
# Include PCI device driver build support
DEPPATH += --dep-path pci
+8
View File
@@ -132,6 +132,14 @@ int pci_register_drivers(void)
}
#endif
#ifdef CONFIG_PCI_EP_TEST
ret = pci_register_ep_test_driver();
if (ret < 0)
{
pcierr("pci_register_ep_test_driver failed, ret=%d\n", ret);
}
#endif
/* Initialization e1000 driver */
#ifdef CONFIG_NET_E1000
+12
View File
@@ -79,4 +79,16 @@ int pci_register_qemu_epc_driver(void);
int pci_register_epf_test_driver(void);
#endif
/****************************************************************************
* Name: pci_register_ep_test_driver
*
* Description:
* Register endpoint test device pci driver
*
****************************************************************************/
#ifdef CONFIG_PCI_EP_TEST
int pci_register_ep_test_driver(void);
#endif
#endif /* __DRIVERS_PCI_PCI_DRIVERS_H */
File diff suppressed because it is too large Load Diff