Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: dw-edma: Rename dw_edma_core_ops structure to dw_edma_plat_ops

The dw_edma_core_ops structure contains a set of the operations:
device IRQ numbers getter, CPU/PCI address translation. Based on the
functions semantics the structure name "dw_edma_plat_ops" looks more
descriptive since indeed the operations are platform-specific. The
"dw_edma_core_ops" name shall be used for a structure with the IP-core
specific set of callbacks in order to abstract out DW eDMA and DW HDMA
setups. Such structure will be added in one of the next commit in the
framework of the set of changes adding the DW HDMA device support.

Anyway the renaming was necessary to distinguish two types of
the implementation callbacks:
1. DW eDMA/hDMA IP-core specific operations: device-specific CSR
setups in one or another aspect of the DMA-engine initialization.
2. DW eDMA/hDMA platform specific operations: the DMA device
environment configs like IRQs, address translation, etc.

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Link: https://lore.kernel.org/r/20230520050854.73160-2-cai.huoqing@linux.dev
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Cai Huoqing and committed by
Vinod Koul
48751755 41be14c7

+5 -5
+2 -2
drivers/dma/dw-edma/dw-edma-pcie.c
··· 109 109 return region.start; 110 110 } 111 111 112 - static const struct dw_edma_core_ops dw_edma_pcie_core_ops = { 112 + static const struct dw_edma_plat_ops dw_edma_pcie_plat_ops = { 113 113 .irq_vector = dw_edma_pcie_irq_vector, 114 114 .pci_address = dw_edma_pcie_address, 115 115 }; ··· 225 225 226 226 chip->mf = vsec_data.mf; 227 227 chip->nr_irqs = nr_irqs; 228 - chip->ops = &dw_edma_pcie_core_ops; 228 + chip->ops = &dw_edma_pcie_plat_ops; 229 229 230 230 chip->ll_wr_cnt = vsec_data.wr_ch_cnt; 231 231 chip->ll_rd_cnt = vsec_data.rd_ch_cnt;
+1 -1
drivers/pci/controller/dwc/pcie-designware.c
··· 828 828 return platform_get_irq_byname_optional(pdev, name); 829 829 } 830 830 831 - static struct dw_edma_core_ops dw_pcie_edma_ops = { 831 + static struct dw_edma_plat_ops dw_pcie_edma_ops = { 832 832 .irq_vector = dw_pcie_edma_irq_vector, 833 833 }; 834 834
+2 -2
include/linux/dma/edma.h
··· 40 40 * iATU windows. That will be done by the controller 41 41 * automatically. 42 42 */ 43 - struct dw_edma_core_ops { 43 + struct dw_edma_plat_ops { 44 44 int (*irq_vector)(struct device *dev, unsigned int nr); 45 45 u64 (*pci_address)(struct device *dev, phys_addr_t cpu_addr); 46 46 }; ··· 80 80 struct dw_edma_chip { 81 81 struct device *dev; 82 82 int nr_irqs; 83 - const struct dw_edma_core_ops *ops; 83 + const struct dw_edma_plat_ops *ops; 84 84 u32 flags; 85 85 86 86 void __iomem *reg_base;