Skip to content

Commit 4875175

Browse files
caihuoqvinodkoul
authored andcommitted
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>
1 parent 41be14c commit 4875175

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/dma/dw-edma/dw-edma-pcie.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static u64 dw_edma_pcie_address(struct device *dev, phys_addr_t cpu_addr)
109109
return region.start;
110110
}
111111

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 = {
113113
.irq_vector = dw_edma_pcie_irq_vector,
114114
.pci_address = dw_edma_pcie_address,
115115
};
@@ -225,7 +225,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
225225

226226
chip->mf = vsec_data.mf;
227227
chip->nr_irqs = nr_irqs;
228-
chip->ops = &dw_edma_pcie_core_ops;
228+
chip->ops = &dw_edma_pcie_plat_ops;
229229

230230
chip->ll_wr_cnt = vsec_data.wr_ch_cnt;
231231
chip->ll_rd_cnt = vsec_data.rd_ch_cnt;

drivers/pci/controller/dwc/pcie-designware.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ static int dw_pcie_edma_irq_vector(struct device *dev, unsigned int nr)
828828
return platform_get_irq_byname_optional(pdev, name);
829829
}
830830

831-
static struct dw_edma_core_ops dw_pcie_edma_ops = {
831+
static struct dw_edma_plat_ops dw_pcie_edma_ops = {
832832
.irq_vector = dw_pcie_edma_irq_vector,
833833
};
834834

include/linux/dma/edma.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct dw_edma_region {
4040
* iATU windows. That will be done by the controller
4141
* automatically.
4242
*/
43-
struct dw_edma_core_ops {
43+
struct dw_edma_plat_ops {
4444
int (*irq_vector)(struct device *dev, unsigned int nr);
4545
u64 (*pci_address)(struct device *dev, phys_addr_t cpu_addr);
4646
};
@@ -80,7 +80,7 @@ enum dw_edma_chip_flags {
8080
struct dw_edma_chip {
8181
struct device *dev;
8282
int nr_irqs;
83-
const struct dw_edma_core_ops *ops;
83+
const struct dw_edma_plat_ops *ops;
8484
u32 flags;
8585

8686
void __iomem *reg_base;

0 commit comments

Comments
 (0)