linux/drivers/dma/dw-edma
Alan Mikhak fc6f5d0a49 dmaengine: dw-edma: Decouple dw-edma-core.c from struct pci_dev
Decouple dw-edma-core.c from struct pci_dev as a step toward integration
of dw-edma with pci-epf-test so the latter can initiate dma operations
locally from the endpoint side. A barrier to such integration is the
dependency of dw_edma_probe() and other functions in dw-edma-core.c on
struct pci_dev.

The Synopsys DesignWare dw-edma driver was designed to run on host side
of PCIe link to initiate DMA operations remotely using eDMA channels of
PCIe controller on the endpoint side. This can be inferred from seeing
that dw-edma uses struct pci_dev and accesses hardware registers of dma
channels across the bus using BAR0 and BAR2.

The ops field of struct dw_edma in dw-edma-core.h is currenty undefined:

const struct dw_edma_core_ops   *ops;

However, the kernel builds without failure even when dw-edma driver is
enabled. Instead of removing the currently undefined and usued ops field,
define struct dw_edma_core_ops and use the ops field to decouple
dw-edma-core.c from struct pci_dev.

Signed-off-by: Alan Mikhak <alan.mikhak@sifive.com>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Link: https://lore.kernel.org/r/1586971629-30196-1-git-send-email-alan.mikhak@sifive.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-04-17 17:20:20 +05:30
..
dw-edma-core.c dmaengine: dw-edma: Decouple dw-edma-core.c from struct pci_dev 2020-04-17 17:20:20 +05:30
dw-edma-core.h dmaengine: dw-edma: Decouple dw-edma-core.c from struct pci_dev 2020-04-17 17:20:20 +05:30
dw-edma-pcie.c dmaengine: dw-edma: Decouple dw-edma-core.c from struct pci_dev 2020-04-17 17:20:20 +05:30
dw-edma-v0-core.c dmaengine: dw-edma: fix endianess confusion 2019-07-22 20:58:15 +05:30
dw-edma-v0-core.h
dw-edma-v0-debugfs.c dmaengine: dw-edma: fix __iomem type confusion 2019-07-22 20:58:00 +05:30
dw-edma-v0-debugfs.h dmaengine: Add Synopsys eDMA IP version 0 debugfs support 2019-06-10 13:10:39 +05:30
dw-edma-v0-regs.h
Kconfig dmaengine: dw-edma: Fix build error without CONFIG_PCI_MSI 2019-06-12 10:22:02 +05:30
Makefile dmaengine: Add Synopsys eDMA IP PCIe glue-logic 2019-06-10 13:10:39 +05:30