aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-01-07 06:07:37 -0500
committerVinod Koul <vkoul@kernel.org>2019-01-07 07:27:13 -0500
commit078165779608873e7b6eae1316a39c73af9f3edc (patch)
tree0b98eb26219af322982feee99a031fbb5440697d
parentd7dba6be0f31ae61f5f3296aa130f45d57d30f74 (diff)
dmaengine: dw: Remove unused internal property
All known devices, which use DT for configuration, support memory-to-memory transfers. So enable it by default. The rest two cases, i.e. Intel Quark and PPC460ex, instantiate DMA driver and use its channels exclusively for hardware, which means there is no available channel for any other purposes anyway. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/dma/dw/core.c4
-rw-r--r--drivers/dma/dw/pci.c1
-rw-r--r--drivers/dma/dw/platform.c6
-rw-r--r--include/linux/platform_data/dma-dw.h2
4 files changed, 1 insertions, 12 deletions
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index e25503986680..4982e443869c 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -1227,7 +1227,6 @@ int dw_dma_probe(struct dw_dma_chip *chip)
1227 pdata->block_size = dma_readl(dw, MAX_BLK_SIZE); 1227 pdata->block_size = dma_readl(dw, MAX_BLK_SIZE);
1228 1228
1229 /* Fill platform data with the default values */ 1229 /* Fill platform data with the default values */
1230 pdata->is_memcpy = true;
1231 pdata->chan_allocation_order = CHAN_ALLOCATION_ASCENDING; 1230 pdata->chan_allocation_order = CHAN_ALLOCATION_ASCENDING;
1232 pdata->chan_priority = CHAN_PRIORITY_ASCENDING; 1231 pdata->chan_priority = CHAN_PRIORITY_ASCENDING;
1233 } else if (chip->pdata->nr_channels > DW_DMA_MAX_NR_CHANNELS) { 1232 } else if (chip->pdata->nr_channels > DW_DMA_MAX_NR_CHANNELS) {
@@ -1340,8 +1339,7 @@ int dw_dma_probe(struct dw_dma_chip *chip)
1340 /* Set capabilities */ 1339 /* Set capabilities */
1341 dma_cap_set(DMA_SLAVE, dw->dma.cap_mask); 1340 dma_cap_set(DMA_SLAVE, dw->dma.cap_mask);
1342 dma_cap_set(DMA_PRIVATE, dw->dma.cap_mask); 1341 dma_cap_set(DMA_PRIVATE, dw->dma.cap_mask);
1343 if (pdata->is_memcpy) 1342 dma_cap_set(DMA_MEMCPY, dw->dma.cap_mask);
1344 dma_cap_set(DMA_MEMCPY, dw->dma.cap_mask);
1345 1343
1346 dw->dma.dev = chip->dev; 1344 dw->dma.dev = chip->dev;
1347 dw->dma.device_alloc_chan_resources = dwc_alloc_chan_resources; 1345 dw->dma.device_alloc_chan_resources = dwc_alloc_chan_resources;
diff --git a/drivers/dma/dw/pci.c b/drivers/dma/dw/pci.c
index 570498faadc3..66d98d7ccad0 100644
--- a/drivers/dma/dw/pci.c
+++ b/drivers/dma/dw/pci.c
@@ -17,7 +17,6 @@
17 17
18static struct dw_dma_platform_data mrfld_pdata = { 18static struct dw_dma_platform_data mrfld_pdata = {
19 .nr_channels = 8, 19 .nr_channels = 8,
20 .is_memcpy = true,
21 .is_idma32 = true, 20 .is_idma32 = true,
22 .chan_allocation_order = CHAN_ALLOCATION_ASCENDING, 21 .chan_allocation_order = CHAN_ALLOCATION_ASCENDING,
23 .chan_priority = CHAN_PRIORITY_ASCENDING, 22 .chan_priority = CHAN_PRIORITY_ASCENDING,
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index 6dd8cd1820c1..58fc1ba02a1e 100644
--- a/drivers/dma/dw/platform.c
+++ b/drivers/dma/dw/platform.c
@@ -128,12 +128,6 @@ dw_dma_parse_dt(struct platform_device *pdev)
128 pdata->nr_masters = nr_masters; 128 pdata->nr_masters = nr_masters;
129 pdata->nr_channels = nr_channels; 129 pdata->nr_channels = nr_channels;
130 130
131 /*
132 * All known devices, which use DT for configuration, support
133 * memory-to-memory transfers. So enable it by default.
134 */
135 pdata->is_memcpy = true;
136
137 if (!of_property_read_u32(np, "chan_allocation_order", &tmp)) 131 if (!of_property_read_u32(np, "chan_allocation_order", &tmp))
138 pdata->chan_allocation_order = (unsigned char)tmp; 132 pdata->chan_allocation_order = (unsigned char)tmp;
139 133
diff --git a/include/linux/platform_data/dma-dw.h b/include/linux/platform_data/dma-dw.h
index d443025c5c72..1c85eeee4171 100644
--- a/include/linux/platform_data/dma-dw.h
+++ b/include/linux/platform_data/dma-dw.h
@@ -38,7 +38,6 @@ struct dw_dma_slave {
38/** 38/**
39 * struct dw_dma_platform_data - Controller configuration parameters 39 * struct dw_dma_platform_data - Controller configuration parameters
40 * @nr_channels: Number of channels supported by hardware (max 8) 40 * @nr_channels: Number of channels supported by hardware (max 8)
41 * @is_memcpy: The device channels do support memory-to-memory transfers.
42 * @is_idma32: The type of the DMA controller is iDMA32 41 * @is_idma32: The type of the DMA controller is iDMA32
43 * @chan_allocation_order: Allocate channels starting from 0 or 7 42 * @chan_allocation_order: Allocate channels starting from 0 or 7
44 * @chan_priority: Set channel priority increasing from 0 to 7 or 7 to 0. 43 * @chan_priority: Set channel priority increasing from 0 to 7 or 7 to 0.
@@ -51,7 +50,6 @@ struct dw_dma_slave {
51 */ 50 */
52struct dw_dma_platform_data { 51struct dw_dma_platform_data {
53 unsigned int nr_channels; 52 unsigned int nr_channels;
54 bool is_memcpy;
55 bool is_idma32; 53 bool is_idma32;
56#define CHAN_ALLOCATION_ASCENDING 0 /* zero to seven */ 54#define CHAN_ALLOCATION_ASCENDING 0 /* zero to seven */
57#define CHAN_ALLOCATION_DESCENDING 1 /* seven to zero */ 55#define CHAN_ALLOCATION_DESCENDING 1 /* seven to zero */