mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
pci: add pci endpoint test driver
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user