Skip to content

Commit

Permalink
Support nuttx pci endpoint driver framework
Browse files Browse the repository at this point in the history
Signed-off-by: yangshuyong <[email protected]>
Signed-off-by: lipengfei28 <[email protected]>
  • Loading branch information
yangshuyong authored and lipengfei28 committed Sep 20, 2024
1 parent feca0ff commit 7c39116
Show file tree
Hide file tree
Showing 9 changed files with 2,976 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/pci/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,11 @@ if(CONFIG_PCI)
target_sources(drivers PRIVATE ${SRCS})

endif() # CONFIG_PCI

if(CONFIG_PCI_ENDPOINT)

set(SRCS pci_epc.c pci_epc_mem.c pci_epf.c)

target_sources(drivers PRIVATE ${SRCS})

endif() # CONFIG_PCI_ENDPOINT
9 changes: 9 additions & 0 deletions drivers/pci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,12 @@ config PCI_UIO_IVSHMEM_NPOLLWAITERS
depends on PCI_UIO_IVSHMEM

endif # PCI

menuconfig PCI_ENDPOINT
bool "PCI Endpoint Support"
default n
---help---
Enable this configuration option to support configurable PCI
endpoint. This should be enabled if the platform has a PCI
controller that can operate in endpoint mode.

4 changes: 4 additions & 0 deletions drivers/pci/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ ifeq ($(CONFIG_PCI_UIO_IVSHMEM),y)
CSRCS += pci_uio_ivshmem.c
endif

ifeq ($(CONFIG_PCI_ENDPOINT),y)
CSRCS += pci_epc.c pci_epc_mem.c pci_epf.c
endif

# Include PCI device driver build support

DEPPATH += --dep-path pci
Expand Down
Loading

0 comments on commit 7c39116

Please sign in to comment.