summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-06-18 17:54:43 +0900
committerMark Brown <broonie@linaro.org>2014-06-18 11:06:37 +0100
commit64eae986fc1e3a281b00f04b7c9c00b145ec8a57 (patch)
treee334618a54003036dea7368669955b66984ced06 /sound/soc/sh
parent4cf612780cec81317a0278b28679a8b69ea8f09c (diff)
ASoC: rsnd: fixup rsnd_gen_dma_addr() for Gen1
ad32d0c7b0e993433df152ae747652647eb65a27 (ASoC: rsnd: add rsnd_gen_dma_addr() for DMAC addr) added rsnd_gen_dma_addr() to calculate DMA addr, but, it is necessary only for Gen2. This patch ignores Gen1 case. Kernel will be panic without this patch. Special thanks to Simon Reported-by: Simon Horman <horms@verge.net.au> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/rcar/gen.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
index 1dd2b7d38c2..0280a11c089 100644
--- a/sound/soc/sh/rcar/gen.c
+++ b/sound/soc/sh/rcar/gen.c
@@ -184,7 +184,7 @@ static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
#define RDMA_CMD_O_N(addr, i) (addr ##_reg - 0x004f8000 + (0x400 * i))
#define RDMA_CMD_O_P(addr, i) (addr ##_reg - 0x001f8000 + (0x400 * i))
-void rsnd_gen_dma_addr(struct rsnd_priv *priv,
+static void rsnd_gen2_dma_addr(struct rsnd_priv *priv,
struct rsnd_dma *dma,
struct dma_slave_config *cfg,
int is_play, int slave_id)
@@ -226,17 +226,6 @@ void rsnd_gen_dma_addr(struct rsnd_priv *priv,
}
};
- cfg->slave_id = slave_id;
- cfg->src_addr = 0;
- cfg->dst_addr = 0;
- cfg->direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-
- /*
- * gen1 uses default DMA addr
- */
- if (rsnd_is_gen1(priv))
- return;
-
/* it shouldn't happen */
if (use_dvc & !use_src) {
dev_err(dev, "DVC is selected without SRC\n");
@@ -250,6 +239,26 @@ void rsnd_gen_dma_addr(struct rsnd_priv *priv,
id, cfg->src_addr, cfg->dst_addr);
}
+void rsnd_gen_dma_addr(struct rsnd_priv *priv,
+ struct rsnd_dma *dma,
+ struct dma_slave_config *cfg,
+ int is_play, int slave_id)
+{
+ cfg->slave_id = slave_id;
+ cfg->src_addr = 0;
+ cfg->dst_addr = 0;
+ cfg->direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
+
+ /*
+ * gen1 uses default DMA addr
+ */
+ if (rsnd_is_gen1(priv))
+ return;
+
+ rsnd_gen2_dma_addr(priv, dma, cfg, is_play, slave_id);
+}
+
+
/*
* Gen2
*/