summaryrefslogtreecommitdiff
path: root/sound/soc/sh/rcar/rsnd.h
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-10-26 11:38:26 +0300
committerMark Brown <broonie@kernel.org>2015-11-16 13:09:29 +0300
commit232c00b6e55558c216cbf50358549a1967ee1419 (patch)
tree319673419b3a2aad8e89f73457db56607a7de68b /sound/soc/sh/rcar/rsnd.h
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
downloadlinux-232c00b6e55558c216cbf50358549a1967ee1419.tar.xz
ASoC: rsnd: DMA become SSI/SRC member
Renesas sound needs many devices (SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp). SSI/SRC/CTU/MIX/DVC are implemented as module. SSI parent, SSIU are implemented as part of SSI CMD is implemented as part of CTU/MIX/DVC AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC It is nice sense that these all devices are implemented as mod. Current rsnd_mod is member of rsnd_mod. But the DMA user is only SSI/SRC. This DMA will be implemented as module. As 1st step, DMA become SSI/SRC member by this patch. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/rsnd.h')
-rw-r--r--sound/soc/sh/rcar/rsnd.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 085329878525..1c08eaa51430 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -206,6 +206,7 @@ struct rsnd_dmapp {
struct rsnd_dma {
struct rsnd_dma_ops *ops;
+ struct rsnd_mod *mod;
dma_addr_t src_addr;
dma_addr_t dst_addr;
union {
@@ -215,11 +216,12 @@ struct rsnd_dma {
};
#define rsnd_dma_to_dmaen(dma) (&(dma)->dma.en)
#define rsnd_dma_to_dmapp(dma) (&(dma)->dma.pp)
-#define rsnd_dma_to_mod(_dma) container_of((_dma), struct rsnd_mod, dma)
+#define rsnd_dma_to_mod(_dma) ((dma)->mod)
void rsnd_dma_start(struct rsnd_dai_stream *io, struct rsnd_dma *dma);
void rsnd_dma_stop(struct rsnd_dai_stream *io, struct rsnd_dma *dma);
-int rsnd_dma_init(struct rsnd_dai_stream *io, struct rsnd_dma *dma, int id);
+struct rsnd_dma *rsnd_dma_init(struct rsnd_dai_stream *io,
+ struct rsnd_mod *mod, int id);
void rsnd_dma_quit(struct rsnd_dai_stream *io, struct rsnd_dma *dma);
int rsnd_dma_probe(struct platform_device *pdev,
const struct rsnd_of_data *of_data,
@@ -278,7 +280,6 @@ struct rsnd_mod {
int id;
enum rsnd_mod_type type;
struct rsnd_mod_ops *ops;
- struct rsnd_dma dma;
struct rsnd_priv *priv;
struct clk *clk;
u32 status;
@@ -328,7 +329,6 @@ struct rsnd_mod {
#define __rsnd_mod_call_hw_params 0
#define rsnd_mod_to_priv(mod) ((mod)->priv)
-#define rsnd_mod_to_dma(mod) (&(mod)->dma)
#define rsnd_mod_id(mod) ((mod) ? (mod)->id : -1)
#define rsnd_mod_power_on(mod) clk_enable((mod)->clk)
#define rsnd_mod_power_off(mod) clk_disable((mod)->clk)