ASoC: add Renesas R-Car SSI feature

Renesas R-Car series sound circuit consists of SSI and its peripheral.
But this peripheral circuit is different between
R-Car Generation1 (E1/M1/H1) and Generation2 (E2/M2/H2)
(Actually, there are many difference in Generation1 chips)

As 1st protype, this patch adds SSI feature on this driver.
But, it is PIO sound playback support only at this point.
The DMA transfer, and capture feature will be supported in the future

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
index ed21a13..5e4ae0d 100644
--- a/sound/soc/sh/rcar/gen.c
+++ b/sound/soc/sh/rcar/gen.c
@@ -72,6 +72,12 @@
 	else
 		id = info->ssi_id_capture;
 
+	/* SSI */
+	mod = rsnd_ssi_mod_get(priv, id);
+	ret = rsnd_dai_connect(rdai, mod, io);
+	if (ret < 0)
+		return ret;
+
 	/* SCU */
 	mod = rsnd_scu_mod_get(priv, id);
 	ret = rsnd_dai_connect(rdai, mod, io);
@@ -120,6 +126,12 @@
 	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);
+
+	RSND_GEN1_REG_MAP(gen, SSI,	SSICR,		0x40,	0x00);
+	RSND_GEN1_REG_MAP(gen, SSI,	SSISR,		0x40,	0x04);
+	RSND_GEN1_REG_MAP(gen, SSI,	SSITDR,		0x40,	0x08);
+	RSND_GEN1_REG_MAP(gen, SSI,	SSIRDR,		0x40,	0x0c);
+	RSND_GEN1_REG_MAP(gen, SSI,	SSIWSR,		0x40,	0x20);
 }
 
 static int rsnd_gen1_probe(struct platform_device *pdev,
@@ -130,14 +142,17 @@
 	struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
 	struct resource *sru_res;
 	struct resource *adg_res;
+	struct resource *ssi_res;
 
 	/*
 	 * map address
 	 */
 	sru_res	= platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN1_SRU);
 	adg_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN1_ADG);
+	ssi_res	= platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN1_SSI);
 	if (!sru_res ||
-	    !adg_res) {
+	    !adg_res ||
+	    !ssi_res) {
 		dev_err(dev, "Not enough SRU/SSI/ADG platform resources.\n");
 		return -ENODEV;
 	}
@@ -146,8 +161,10 @@
 
 	gen->base[RSND_GEN1_SRU] = devm_ioremap_resource(dev, sru_res);
 	gen->base[RSND_GEN1_ADG] = devm_ioremap_resource(dev, adg_res);
+	gen->base[RSND_GEN1_SSI] = devm_ioremap_resource(dev, ssi_res);
 	if (!gen->base[RSND_GEN1_SRU] ||
-	    !gen->base[RSND_GEN1_ADG]) {
+	    !gen->base[RSND_GEN1_ADG] ||
+	    !gen->base[RSND_GEN1_SSI]) {
 		dev_err(dev, "SRU/SSI/ADG ioremap failed\n");
 		return -ENODEV;
 	}
@@ -159,8 +176,11 @@
 						gen->base[RSND_GEN1_SRU]);
 	dev_dbg(dev, "ADG : %08x => %p\n",	adg_res->start,
 						gen->base[RSND_GEN1_ADG]);
+	dev_dbg(dev, "SSI : %08x => %p\n",	ssi_res->start,
+						gen->base[RSND_GEN1_SSI]);
 
 	return 0;
+
 }
 
 static void rsnd_gen1_remove(struct platform_device *pdev,