From 9ad78eb60cfa629c1caf7217dbbf7adc5d747011 Mon Sep 17 00:00:00 2001 From: Christopher Friedt Date: Sat, 29 Apr 2023 07:03:23 -0400 Subject: [PATCH] drivers: pcie_ep: iproc: compile-out unused function based on DT Compile-out `iproc_pcie_pl330_dma_xfer()` if there are no active DMA users in devicetree. Signed-off-by: Christopher Friedt --- drivers/pcie/endpoint/pcie_ep_iproc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pcie/endpoint/pcie_ep_iproc.c b/drivers/pcie/endpoint/pcie_ep_iproc.c index 1fc2dc434a9..92050051cf9 100644 --- a/drivers/pcie/endpoint/pcie_ep_iproc.c +++ b/drivers/pcie/endpoint/pcie_ep_iproc.c @@ -175,6 +175,7 @@ static int iproc_pcie_register_reset_cb(const struct device *dev, return 0; } +#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(dmas) static int iproc_pcie_pl330_dma_xfer(const struct device *dev, uint64_t mapped_addr, uintptr_t local_addr, uint32_t size, @@ -222,6 +223,7 @@ static int iproc_pcie_pl330_dma_xfer(const struct device *dev, out: return ret; } +#endif #if DT_INST_IRQ_HAS_NAME(0, perst) static void iproc_pcie_perst(const struct device *dev)