aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/dw/platform.c')
-rw-r--r--drivers/dma/dw/platform.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index 31ff8113c3de..382dfd9e9600 100644
--- a/drivers/dma/dw/platform.c
+++ b/drivers/dma/dw/platform.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Platform driver for the Synopsys DesignWare DMA Controller 3 * Platform driver for the Synopsys DesignWare DMA Controller
3 * 4 *
@@ -6,10 +7,6 @@
6 * Copyright (C) 2013 Intel Corporation 7 * Copyright (C) 2013 Intel Corporation
7 * 8 *
8 * Some parts of this driver are derived from the original dw_dmac. 9 * Some parts of this driver are derived from the original dw_dmac.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */ 10 */
14 11
15#include <linux/module.h> 12#include <linux/module.h>
@@ -128,15 +125,6 @@ dw_dma_parse_dt(struct platform_device *pdev)
128 pdata->nr_masters = nr_masters; 125 pdata->nr_masters = nr_masters;
129 pdata->nr_channels = nr_channels; 126 pdata->nr_channels = nr_channels;
130 127
131 if (of_property_read_bool(np, "is_private"))
132 pdata->is_private = true;
133
134 /*
135 * All known devices, which use DT for configuration, support
136 * memory-to-memory transfers. So enable it by default.
137 */
138 pdata->is_memcpy = true;
139
140 if (!of_property_read_u32(np, "chan_allocation_order", &tmp)) 128 if (!of_property_read_u32(np, "chan_allocation_order", &tmp))
141 pdata->chan_allocation_order = (unsigned char)tmp; 129 pdata->chan_allocation_order = (unsigned char)tmp;
142 130
@@ -264,7 +252,7 @@ static void dw_shutdown(struct platform_device *pdev)
264 struct dw_dma_chip *chip = platform_get_drvdata(pdev); 252 struct dw_dma_chip *chip = platform_get_drvdata(pdev);
265 253
266 /* 254 /*
267 * We have to call dw_dma_disable() to stop any ongoing transfer. On 255 * We have to call do_dw_dma_disable() to stop any ongoing transfer. On
268 * some platforms we can't do that since DMA device is powered off. 256 * some platforms we can't do that since DMA device is powered off.
269 * Moreover we have no possibility to check if the platform is affected 257 * Moreover we have no possibility to check if the platform is affected
270 * or not. That's why we call pm_runtime_get_sync() / pm_runtime_put() 258 * or not. That's why we call pm_runtime_get_sync() / pm_runtime_put()
@@ -273,7 +261,7 @@ static void dw_shutdown(struct platform_device *pdev)
273 * used by the driver. 261 * used by the driver.
274 */ 262 */
275 pm_runtime_get_sync(chip->dev); 263 pm_runtime_get_sync(chip->dev);
276 dw_dma_disable(chip); 264 do_dw_dma_disable(chip);
277 pm_runtime_put_sync_suspend(chip->dev); 265 pm_runtime_put_sync_suspend(chip->dev);
278 266
279 clk_disable_unprepare(chip->clk); 267 clk_disable_unprepare(chip->clk);
@@ -303,7 +291,7 @@ static int dw_suspend_late(struct device *dev)
303{ 291{
304 struct dw_dma_chip *chip = dev_get_drvdata(dev); 292 struct dw_dma_chip *chip = dev_get_drvdata(dev);
305 293
306 dw_dma_disable(chip); 294 do_dw_dma_disable(chip);
307 clk_disable_unprepare(chip->clk); 295 clk_disable_unprepare(chip->clk);
308 296
309 return 0; 297 return 0;
@@ -318,7 +306,7 @@ static int dw_resume_early(struct device *dev)
318 if (ret) 306 if (ret)
319 return ret; 307 return ret;
320 308
321 return dw_dma_enable(chip); 309 return do_dw_dma_enable(chip);
322} 310}
323 311
324#endif /* CONFIG_PM_SLEEP */ 312#endif /* CONFIG_PM_SLEEP */