aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-05-19 14:33:54 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-05-22 03:51:17 -0400
commit10440af1bc8082c78186e7f4ea94124acee6625e (patch)
tree119a04516924aed333f8c4e8890233a4ec5fdbd9
parent2d151248286d438e97ebb22ff676423df299da86 (diff)
sh: define DMA slaves per CPU type, remove now redundant header
Now that DMA slave IDs are only used used in platform specific code and have become opaque cookies for the rest of the code, we can make the, CPU specific too. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/include/asm/dmaengine.h34
-rw-r--r--arch/sh/include/asm/siu.h2
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7722.h15
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7724.h19
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c1
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7724.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7780.c3
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7785.c2
-rw-r--r--sound/soc/sh/siu.h3
-rw-r--r--sound/soc/sh/siu_pcm.c9
10 files changed, 42 insertions, 48 deletions
diff --git a/arch/sh/include/asm/dmaengine.h b/arch/sh/include/asm/dmaengine.h
deleted file mode 100644
index 2a02b611a9ad..000000000000
--- a/arch/sh/include/asm/dmaengine.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * Header for the new SH dmaengine driver
3 *
4 * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef ASM_DMAENGINE_H
11#define ASM_DMAENGINE_H
12
13#include <linux/sh_dma.h>
14
15enum {
16 SHDMA_SLAVE_SCIF0_TX,
17 SHDMA_SLAVE_SCIF0_RX,
18 SHDMA_SLAVE_SCIF1_TX,
19 SHDMA_SLAVE_SCIF1_RX,
20 SHDMA_SLAVE_SCIF2_TX,
21 SHDMA_SLAVE_SCIF2_RX,
22 SHDMA_SLAVE_SCIF3_TX,
23 SHDMA_SLAVE_SCIF3_RX,
24 SHDMA_SLAVE_SCIF4_TX,
25 SHDMA_SLAVE_SCIF4_RX,
26 SHDMA_SLAVE_SCIF5_TX,
27 SHDMA_SLAVE_SCIF5_RX,
28 SHDMA_SLAVE_SIUA_TX,
29 SHDMA_SLAVE_SIUA_RX,
30 SHDMA_SLAVE_SIUB_TX,
31 SHDMA_SLAVE_SIUB_RX,
32};
33
34#endif
diff --git a/arch/sh/include/asm/siu.h b/arch/sh/include/asm/siu.h
index e8d4142baf59..1d95c78808d1 100644
--- a/arch/sh/include/asm/siu.h
+++ b/arch/sh/include/asm/siu.h
@@ -11,8 +11,6 @@
11#ifndef ASM_SIU_H 11#ifndef ASM_SIU_H
12#define ASM_SIU_H 12#define ASM_SIU_H
13 13
14#include <asm/dmaengine.h>
15
16struct device; 14struct device;
17 15
18struct siu_platform { 16struct siu_platform {
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h
index 48560407cbe1..7a5b8a331b4a 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7722.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h
@@ -235,4 +235,19 @@ enum {
235 HWBLK_NR, 235 HWBLK_NR,
236}; 236};
237 237
238enum {
239 SHDMA_SLAVE_SCIF0_TX,
240 SHDMA_SLAVE_SCIF0_RX,
241 SHDMA_SLAVE_SCIF1_TX,
242 SHDMA_SLAVE_SCIF1_RX,
243 SHDMA_SLAVE_SCIF2_TX,
244 SHDMA_SLAVE_SCIF2_RX,
245 SHDMA_SLAVE_SIUA_TX,
246 SHDMA_SLAVE_SIUA_RX,
247 SHDMA_SLAVE_SIUB_TX,
248 SHDMA_SLAVE_SIUB_RX,
249 SHDMA_SLAVE_SDHI0_TX,
250 SHDMA_SLAVE_SDHI0_RX,
251};
252
238#endif /* __ASM_SH7722_H__ */ 253#endif /* __ASM_SH7722_H__ */
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h
index 0cd1f71a1116..fbbf550cc529 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7724.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h
@@ -283,4 +283,23 @@ enum {
283 HWBLK_NR, 283 HWBLK_NR,
284}; 284};
285 285
286enum {
287 SHDMA_SLAVE_SCIF0_TX,
288 SHDMA_SLAVE_SCIF0_RX,
289 SHDMA_SLAVE_SCIF1_TX,
290 SHDMA_SLAVE_SCIF1_RX,
291 SHDMA_SLAVE_SCIF2_TX,
292 SHDMA_SLAVE_SCIF2_RX,
293 SHDMA_SLAVE_SCIF3_TX,
294 SHDMA_SLAVE_SCIF3_RX,
295 SHDMA_SLAVE_SCIF4_TX,
296 SHDMA_SLAVE_SCIF4_RX,
297 SHDMA_SLAVE_SCIF5_TX,
298 SHDMA_SLAVE_SCIF5_RX,
299 SHDMA_SLAVE_SDHI0_TX,
300 SHDMA_SLAVE_SDHI0_RX,
301 SHDMA_SLAVE_SDHI1_TX,
302 SHDMA_SLAVE_SDHI1_RX,
303};
304
286#endif /* __ASM_SH7724_H__ */ 305#endif /* __ASM_SH7724_H__ */
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 24c6167a7181..c7219de6c4e4 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -17,7 +17,6 @@
17#include <linux/usb/m66592.h> 17#include <linux/usb/m66592.h>
18 18
19#include <asm/clock.h> 19#include <asm/clock.h>
20#include <asm/dmaengine.h>
21#include <asm/mmzone.h> 20#include <asm/mmzone.h>
22#include <asm/siu.h> 21#include <asm/siu.h>
23 22
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index 89fe16d20fdb..abd4c2e501db 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -18,13 +18,13 @@
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/serial_sci.h> 19#include <linux/serial_sci.h>
20#include <linux/uio_driver.h> 20#include <linux/uio_driver.h>
21#include <linux/sh_dma.h>
21#include <linux/sh_timer.h> 22#include <linux/sh_timer.h>
22#include <linux/io.h> 23#include <linux/io.h>
23#include <linux/notifier.h> 24#include <linux/notifier.h>
24 25
25#include <asm/suspend.h> 26#include <asm/suspend.h>
26#include <asm/clock.h> 27#include <asm/clock.h>
27#include <asm/dmaengine.h>
28#include <asm/mmzone.h> 28#include <asm/mmzone.h>
29 29
30#include <cpu/dma-register.h> 30#include <cpu/dma-register.h>
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
index b12f537e4dde..0f414864f76b 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
@@ -12,10 +12,9 @@
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/serial_sci.h> 14#include <linux/serial_sci.h>
15#include <linux/sh_dma.h>
15#include <linux/sh_timer.h> 16#include <linux/sh_timer.h>
16 17
17#include <asm/dmaengine.h>
18
19#include <cpu/dma-register.h> 18#include <cpu/dma-register.h>
20 19
21static struct plat_sci_port scif0_platform_data = { 20static struct plat_sci_port scif0_platform_data = {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
index f3e3ea0ce050..c9a572bc6dc8 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
@@ -13,9 +13,9 @@
13#include <linux/serial_sci.h> 13#include <linux/serial_sci.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <linux/sh_dma.h>
16#include <linux/sh_timer.h> 17#include <linux/sh_timer.h>
17 18
18#include <asm/dmaengine.h>
19#include <asm/mmzone.h> 19#include <asm/mmzone.h>
20 20
21#include <cpu/dma-register.h> 21#include <cpu/dma-register.h>
diff --git a/sound/soc/sh/siu.h b/sound/soc/sh/siu.h
index c0bfab8fed3d..492b1cae24cc 100644
--- a/sound/soc/sh/siu.h
+++ b/sound/soc/sh/siu.h
@@ -71,8 +71,7 @@ struct siu_firmware {
71#include <linux/dmaengine.h> 71#include <linux/dmaengine.h>
72#include <linux/interrupt.h> 72#include <linux/interrupt.h>
73#include <linux/io.h> 73#include <linux/io.h>
74 74#include <linux/sh_dma.h>
75#include <asm/dmaengine.h>
76 75
77#include <sound/core.h> 76#include <sound/core.h>
78#include <sound/pcm.h> 77#include <sound/pcm.h>
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c
index 8f85719212f9..36170be15aa7 100644
--- a/sound/soc/sh/siu_pcm.c
+++ b/sound/soc/sh/siu_pcm.c
@@ -31,7 +31,6 @@
31#include <sound/pcm_params.h> 31#include <sound/pcm_params.h>
32#include <sound/soc-dai.h> 32#include <sound/soc-dai.h>
33 33
34#include <asm/dmaengine.h>
35#include <asm/siu.h> 34#include <asm/siu.h>
36 35
37#include "siu.h" 36#include "siu.h"
@@ -358,13 +357,13 @@ static int siu_pcm_open(struct snd_pcm_substream *ss)
358 if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) { 357 if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) {
359 siu_stream = &port_info->playback; 358 siu_stream = &port_info->playback;
360 param = &siu_stream->param; 359 param = &siu_stream->param;
361 param->slave_id = port ? SHDMA_SLAVE_SIUB_TX : 360 param->slave_id = port ? pdata->dma_slave_tx_b :
362 SHDMA_SLAVE_SIUA_TX; 361 pdata->dma_slave_tx_a;
363 } else { 362 } else {
364 siu_stream = &port_info->capture; 363 siu_stream = &port_info->capture;
365 param = &siu_stream->param; 364 param = &siu_stream->param;
366 param->slave_id = port ? SHDMA_SLAVE_SIUB_RX : 365 param->slave_id = port ? pdata->dma_slave_rx_b :
367 SHDMA_SLAVE_SIUA_RX; 366 pdata->dma_slave_rx_a;
368 } 367 }
369 368
370 param->dma_dev = pdata->dma_dev; 369 param->dma_dev = pdata->dma_dev;