aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-02-02 09:27:06 -0500
committerTony Lindgren <tony@atomide.com>2016-02-22 12:59:44 -0500
commitc4e357839ec32510812c7800de874ebf2afb5d69 (patch)
treeeea7b81485b5f3a3bb7c0f276be6a238e8a325d8
parent06c2d368fc36bc557855fc1234f3f2d9fc6c6988 (diff)
ARM: OMAP1: DMA: Provide dma_slave_map to omap-dma
OMAP1 can not boot in DT mode and to be able to clean up the driver regarding to the dmaengine API use (switching to the new API) the device/slave -> filter mapping needs to be provided to the omap-dma driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap1/dma.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index 7b02ed218a42..f6ba589cd312 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -25,6 +25,7 @@
25#include <linux/device.h> 25#include <linux/device.h>
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/dma-mapping.h> 27#include <linux/dma-mapping.h>
28#include <linux/dmaengine.h>
28#include <linux/omap-dma.h> 29#include <linux/omap-dma.h>
29#include <mach/tc.h> 30#include <mach/tc.h>
30 31
@@ -265,6 +266,42 @@ static const struct platform_device_info omap_dma_dev_info = {
265 .num_res = 1, 266 .num_res = 1,
266}; 267};
267 268
269/* OMAP730, OMAP850 */
270static const struct dma_slave_map omap7xx_sdma_map[] = {
271 { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
272 { "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
273 { "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(10) },
274 { "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(11) },
275 { "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
276 { "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
277 { "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
278 { "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
279 { "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
280 { "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
281 { "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
282 { "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
283};
284
285/* OMAP1510, OMAP1610*/
286static const struct dma_slave_map omap1xxx_sdma_map[] = {
287 { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
288 { "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
289 { "omap-mcbsp.3", "tx", SDMA_FILTER_PARAM(10) },
290 { "omap-mcbsp.3", "rx", SDMA_FILTER_PARAM(11) },
291 { "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(16) },
292 { "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(17) },
293 { "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
294 { "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
295 { "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
296 { "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
297 { "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
298 { "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
299 { "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
300 { "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
301 { "mmci-omap.1", "tx", SDMA_FILTER_PARAM(54) },
302 { "mmci-omap.1", "rx", SDMA_FILTER_PARAM(55) },
303};
304
268static struct omap_system_dma_plat_info dma_plat_info __initdata = { 305static struct omap_system_dma_plat_info dma_plat_info __initdata = {
269 .reg_map = reg_map, 306 .reg_map = reg_map,
270 .channel_stride = 0x40, 307 .channel_stride = 0x40,
@@ -342,6 +379,14 @@ static int __init omap1_system_dma_init(void)
342 p.dma_attr = d; 379 p.dma_attr = d;
343 p.errata = configure_dma_errata(); 380 p.errata = configure_dma_errata();
344 381
382 if (cpu_is_omap7xx()) {
383 p.slave_map = omap7xx_sdma_map;
384 p.slavecnt = ARRAY_SIZE(omap7xx_sdma_map);
385 } else {
386 p.slave_map = omap1xxx_sdma_map;
387 p.slavecnt = ARRAY_SIZE(omap1xxx_sdma_map);
388 }
389
345 ret = platform_device_add_data(pdev, &p, sizeof(p)); 390 ret = platform_device_add_data(pdev, &p, sizeof(p));
346 if (ret) { 391 if (ret) {
347 dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n", 392 dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",