summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/ssi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/sh/rcar/ssi.c')
-rw-r--r--sound/soc/sh/rcar/ssi.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 36654bd4e428..2df723df5d19 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -57,6 +57,8 @@
*/
#define CONT (1 << 8) /* WS Continue Function */
+#define SSI_NAME "ssi"
+
struct rsnd_ssi {
struct clk *clk;
struct rsnd_ssi_platform_info *info; /* rcar_snd.h */
@@ -373,6 +375,8 @@ static int rsnd_ssi_pio_probe(struct rsnd_mod *mod,
if (ret)
dev_err(dev, "SSI request interrupt failed\n");
+ dev_dbg(dev, "%s (PIO) is probed\n", rsnd_mod_name(mod));
+
return ret;
}
@@ -405,7 +409,7 @@ static int rsnd_ssi_pio_stop(struct rsnd_mod *mod,
}
static struct rsnd_mod_ops rsnd_ssi_pio_ops = {
- .name = "ssi (pio)",
+ .name = SSI_NAME,
.probe = rsnd_ssi_pio_probe,
.init = rsnd_ssi_init,
.quit = rsnd_ssi_quit,
@@ -430,6 +434,8 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
if (ret < 0)
dev_err(dev, "SSI DMA failed\n");
+ dev_dbg(dev, "%s (DMA) is probed\n", rsnd_mod_name(mod));
+
return ret;
}
@@ -480,7 +486,7 @@ static int rsnd_ssi_dma_stop(struct rsnd_mod *mod,
}
static struct rsnd_mod_ops rsnd_ssi_dma_ops = {
- .name = "ssi (dma)",
+ .name = SSI_NAME,
.probe = rsnd_ssi_dma_probe,
.remove = rsnd_ssi_dma_remove,
.init = rsnd_ssi_init,
@@ -493,7 +499,7 @@ static struct rsnd_mod_ops rsnd_ssi_dma_ops = {
* Non SSI
*/
static struct rsnd_mod_ops rsnd_ssi_non_ops = {
- .name = "ssi (non)",
+ .name = SSI_NAME,
};
/*
@@ -554,14 +560,14 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev,
nr = of_get_child_count(node);
if (!nr)
- return;
+ goto rsnd_of_parse_ssi_end;
ssi_info = devm_kzalloc(dev,
sizeof(struct rsnd_ssi_platform_info) * nr,
GFP_KERNEL);
if (!ssi_info) {
dev_err(dev, "ssi info allocation error\n");
- return;
+ goto rsnd_of_parse_ssi_end;
}
info->ssi_info = ssi_info;
@@ -583,7 +589,16 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev,
* irq
*/
ssi_info->pio_irq = irq_of_parse_and_map(np, 0);
+
+ /*
+ * DMA
+ */
+ ssi_info->dma_id = of_get_property(np, "pio-transfer", NULL) ?
+ 0 : 1;
}
+
+rsnd_of_parse_ssi_end:
+ of_node_put(node);
}
int rsnd_ssi_probe(struct platform_device *pdev,
@@ -617,7 +632,8 @@ int rsnd_ssi_probe(struct platform_device *pdev,
for_each_rsnd_ssi(ssi, priv, i) {
pinfo = &info->ssi_info[i];
- snprintf(name, RSND_SSI_NAME_SIZE, "ssi.%d", i);
+ snprintf(name, RSND_SSI_NAME_SIZE, "%s.%d",
+ SSI_NAME, i);
clk = devm_clk_get(dev, name);
if (IS_ERR(clk))