History

dmaengine: dw-edma: Replace chip ID number with device name

Using an abstract number as the DW eDMA chip identifier isn't practical because there can be more than one DW eDMA controller on the platform. Some may be detected as the PCIe Endpoints, and others may be embedded in DW PCIe Root Port/Endpoint controllers. An abstract number in, for instance, the IRQ handlers list, doesn't give a notion regarding their reference to the particular DMA controller. To preserve the code simplicity and support multi-eDMA platforms, use the parental device name to create the DW eDMA controller name.

Serge Semin committed 3 years ago

Commit 53c0e2f1 parent 71196854 files · +3 −4Browse files

Unified · Split

4 files
  1. drivers/dma/dw-edma/dw-edma-core.c +2 −1
  2. drivers/dma/dw-edma/dw-edma-core.h +1 −1
  3. drivers/dma/dw-edma/dw-edma-pcie.c +0 −1
  4. include/linux/dma/edma.h +0 −1
drivers/dma/dw-edma/dw-edma-core.c+2−1
@@ -973,7 +973,8 @@ int dw_edma_probe(struct dw_edma_chip *chip) · 972 unmodified lines
973 if (!dw->chan)973 if (!dw->chan)
974 return -ENOMEM;974 return -ENOMEM;
975 975
976 snprintf(dw->name, sizeof(dw->name), "dw-edma-core:%d", chip->id);976 snprintf(dw->name, sizeof(dw->name), "dw-edma-core:%s",
977 dev_name(chip->dev));
977 978
978 /* Disable eDMA, only to establish the ideal initial conditions */979 /* Disable eDMA, only to establish the ideal initial conditions */
979 dw_edma_v0_core_off(dw);980 dw_edma_v0_core_off(dw);
drivers/dma/dw-edma/dw-edma-core.h+1−1
@@ -96,7 +96,7 @@ struct dw_edma_irq { · 95 unmodified lines
96};96};
97 97
98struct dw_edma {98struct dw_edma {
99 char name[20];99 char name[32];
100 100
101 struct dma_device dma;101 struct dma_device dma;
102 102
drivers/dma/dw-edma/dw-edma-pcie.c+0−1
@@ -222,7 +222,6 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev, · 221 unmodified lines
222 222
223 /* Data structure initialization */223 /* Data structure initialization */
224 chip->dev = dev;224 chip->dev = dev;
225 chip->id = pdev->devfn;
226 225
227 chip->mf = vsec_data.mf;226 chip->mf = vsec_data.mf;
228 chip->nr_irqs = nr_irqs;227 chip->nr_irqs = nr_irqs;
include/linux/dma/edma.h+0−1
@@ -76,7 +76,6 @@ enum dw_edma_chip_flags { · 75 unmodified lines
76 */76 */
77struct dw_edma_chip {77struct dw_edma_chip {
78 struct device *dev;78 struct device *dev;
79 int id;
80 int nr_irqs;79 int nr_irqs;
81 const struct dw_edma_core_ops *ops;80 const struct dw_edma_core_ops *ops;
82 u32 flags;81 u32 flags;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t