ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 22 Mar 2017 04:02:43 +0000 (04:02 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 24 Mar 2017 18:49:45 +0000 (18:49 +0000)
R-Car Datasheet is indicating "SSICR.CKDV = 000 is invalid when
SSIWSR.WS_MODE = 1 or SSIWSR.CONT = 1".
Current driver will set CONT, thus, we shouldn't use CKDV = 000.
This patch fixup it.

Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/ssi.c

index 411bda2387adbcdab2dc510706986f5ac92b3cc1..135c5669f7963bd228c9a1187bc6f5dfd13bc04e 100644 (file)
@@ -227,6 +227,15 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
         */
        for (j = 0; j < ARRAY_SIZE(ssi_clk_mul_table); j++) {
 
+               /*
+                * It will set SSIWSR.CONT here, but SSICR.CKDV = 000
+                * with it is not allowed. (SSIWSR.WS_MODE with
+                * SSICR.CKDV = 000 is not allowed either).
+                * Skip it. See SSICR.CKDV
+                */
+               if (j == 0)
+                       continue;
+
                /*
                 * this driver is assuming that
                 * system word is 32bit x chan