diff --git a/drivers/pci/CMakeLists.txt b/drivers/pci/CMakeLists.txt index d89e96587f..15ae0ac208 100644 --- a/drivers/pci/CMakeLists.txt +++ b/drivers/pci/CMakeLists.txt @@ -38,6 +38,10 @@ if(CONFIG_PCI) list(APPEND SRCS pci_uio_ivshmem.c) endif() + if(CONFIG_PCI_EP_TEST) + list(APPEND SRCS pci_ep_test.c) + endif() + target_sources(drivers PRIVATE ${SRCS}) endif() # CONFIG_PCI @@ -54,10 +58,6 @@ 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 diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index fee521c5bc..eb632311bf 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -73,6 +73,11 @@ config PCI_UIO_IVSHMEM_NPOLLWAITERS default 2 depends on PCI_UIO_IVSHMEM +config PCI_EP_TEST + bool "PCI endpoint test" + ---help--- + pci endpoint test driver + endif # PCI menuconfig PCI_ENDPOINT @@ -95,10 +100,5 @@ 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 diff --git a/drivers/pci/Make.defs b/drivers/pci/Make.defs index 4e40738cd3..1a0bed40de 100644 --- a/drivers/pci/Make.defs +++ b/drivers/pci/Make.defs @@ -37,6 +37,10 @@ ifeq ($(CONFIG_PCI_UIO_IVSHMEM),y) CSRCS += pci_uio_ivshmem.c endif +ifeq ($(CONFIG_PCI_EP_TEST),y) +CSRCS += pci_ep_test.c +endif + ifeq ($(CONFIG_PCI_ENDPOINT),y) CSRCS += pci_epc.c pci_epc_mem.c pci_epf.c endif @@ -49,13 +53,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 VPATH += :pci CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)pci + endif # CONFIG_PCI