Return-Path: Received: from mail-cys01nam02on0109.outbound.protection.outlook.com ([104.47.37.109]:20871 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933968AbeCCWin (ORCPT ); Sat, 3 Mar 2018 17:38:43 -0500 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Kuninori Morimoto , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 031/115] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT Date: Sat, 3 Mar 2018 22:31:06 +0000 Message-ID: <20180303223010.27106-31-alexander.levin@microsoft.com> References: <20180303223010.27106-1-alexander.levin@microsoft.com> In-Reply-To: <20180303223010.27106-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Kuninori Morimoto [ Upstream commit 6b8530cc056efd4a11b034ca5b1e9f7e9563f553 ] R-Car Datasheet is indicating "SSICR.CKDV =3D 000 is invalid when SSIWSR.WS_MODE =3D 1 or SSIWSR.CONT =3D 1". Current driver will set CONT, thus, we shouldn't use CKDV =3D 000. This patch fixup it. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sh/rcar/ssi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 38aae96267c9..a001331a53c1 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -142,6 +142,15 @@ static int rsnd_ssi_master_clk_start(struct rsnd_ssi *= ssi, */ for (j =3D 0; j < ARRAY_SIZE(ssi_clk_mul_table); j++) { =20 + /* + * It will set SSIWSR.CONT here, but SSICR.CKDV =3D 000 + * with it is not allowed. (SSIWSR.WS_MODE with + * SSICR.CKDV =3D 000 is not allowed either). + * Skip it. See SSICR.CKDV + */ + if (j =3D=3D 0) + continue; + /* * this driver is assuming that * system word is 64fs (=3D 2 x 32bit) --=20 2.14.1