summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/sh/rcar/gen.c')
-rw-r--r--sound/soc/sh/rcar/gen.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
index 2934c0d731c8..ed21a136354f 100644
--- a/sound/soc/sh/rcar/gen.c
+++ b/sound/soc/sh/rcar/gen.c
@@ -111,6 +111,15 @@ static void rsnd_gen1_reg_map_init(struct rsnd_gen *gen)
{
RSND_GEN1_REG_MAP(gen, SRU, SSI_MODE0, 0x0, 0xD0);
RSND_GEN1_REG_MAP(gen, SRU, SSI_MODE1, 0x0, 0xD4);
+
+ RSND_GEN1_REG_MAP(gen, ADG, BRRA, 0x0, 0x00);
+ RSND_GEN1_REG_MAP(gen, ADG, BRRB, 0x0, 0x04);
+ RSND_GEN1_REG_MAP(gen, ADG, SSICKR, 0x0, 0x08);
+ RSND_GEN1_REG_MAP(gen, ADG, AUDIO_CLK_SEL0, 0x0, 0x0c);
+ RSND_GEN1_REG_MAP(gen, ADG, AUDIO_CLK_SEL1, 0x0, 0x10);
+ RSND_GEN1_REG_MAP(gen, ADG, AUDIO_CLK_SEL3, 0x0, 0x18);
+ RSND_GEN1_REG_MAP(gen, ADG, AUDIO_CLK_SEL4, 0x0, 0x1c);
+ RSND_GEN1_REG_MAP(gen, ADG, AUDIO_CLK_SEL5, 0x0, 0x20);
}
static int rsnd_gen1_probe(struct platform_device *pdev,
@@ -120,12 +129,15 @@ static int rsnd_gen1_probe(struct platform_device *pdev,
struct device *dev = rsnd_priv_to_dev(priv);
struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
struct resource *sru_res;
+ struct resource *adg_res;
/*
* map address
*/
sru_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN1_SRU);
- if (!sru_res) {
+ adg_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN1_ADG);
+ if (!sru_res ||
+ !adg_res) {
dev_err(dev, "Not enough SRU/SSI/ADG platform resources.\n");
return -ENODEV;
}
@@ -133,7 +145,9 @@ static int rsnd_gen1_probe(struct platform_device *pdev,
gen->ops = &rsnd_gen1_ops;
gen->base[RSND_GEN1_SRU] = devm_ioremap_resource(dev, sru_res);
- if (!gen->base[RSND_GEN1_SRU]) {
+ gen->base[RSND_GEN1_ADG] = devm_ioremap_resource(dev, adg_res);
+ if (!gen->base[RSND_GEN1_SRU] ||
+ !gen->base[RSND_GEN1_ADG]) {
dev_err(dev, "SRU/SSI/ADG ioremap failed\n");
return -ENODEV;
}
@@ -143,6 +157,8 @@ static int rsnd_gen1_probe(struct platform_device *pdev,
dev_dbg(dev, "Gen1 device probed\n");
dev_dbg(dev, "SRU : %08x => %p\n", sru_res->start,
gen->base[RSND_GEN1_SRU]);
+ dev_dbg(dev, "ADG : %08x => %p\n", adg_res->start,
+ gen->base[RSND_GEN1_ADG]);
return 0;
}