* [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
@ 2017-03-22 4:02 Kuninori Morimoto
2017-03-22 8:48 ` Sergei Shtylyov
2017-03-24 19:16 ` Applied "ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT" to the asoc tree Mark Brown
0 siblings, 2 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2017-03-22 4:02 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-renesas-soc, Linux-ALSA, Simon, Hiroyuki Yokoyama
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
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>
---
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 9594d44..d0602c1 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -245,6 +245,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
* see rsnd_ssi_init()
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
2017-03-22 4:02 [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT Kuninori Morimoto
@ 2017-03-22 8:48 ` Sergei Shtylyov
2017-03-22 8:56 ` Kuninori Morimoto
2017-03-24 19:16 ` Applied "ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT" to the asoc tree Mark Brown
1 sibling, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2017-03-22 8:48 UTC (permalink / raw)
To: Kuninori Morimoto, Mark Brown
Cc: linux-renesas-soc, Linux-ALSA, Simon, Hiroyuki Yokoyama
Hello!
On 3/22/2017 7:02 AM, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> 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>
> ---
> 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 9594d44..d0602c1 100644
> --- a/sound/soc/sh/rcar/ssi.c
> +++ b/sound/soc/sh/rcar/ssi.c
> @@ -245,6 +245,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;
Why not change the *for* statement itself to start with j = 1?
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
2017-03-22 8:48 ` Sergei Shtylyov
@ 2017-03-22 8:56 ` Kuninori Morimoto
2017-03-24 6:55 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2017-03-22 8:56 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: linux-renesas-soc, Linux-ALSA, Mark Brown, Hiroyuki Yokoyama,
Simon
Hi Sergei
> > /*
> > + * 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;
>
> Why not change the *for* statement itself to start with j = 1?
It can be one solution. Actually my local 1st patch was such style.
But I thought that it is difficult to notice such magical operation from code.
Thus, I used this style
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
2017-03-22 8:56 ` Kuninori Morimoto
@ 2017-03-24 6:55 ` Simon Horman
2017-03-24 8:32 ` Kuninori Morimoto
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2017-03-24 6:55 UTC (permalink / raw)
To: Kuninori Morimoto
Cc: Sergei Shtylyov, Mark Brown, Linux-ALSA, linux-renesas-soc,
Hiroyuki Yokoyama
On Wed, Mar 22, 2017 at 08:56:07AM +0000, Kuninori Morimoto wrote:
>
> Hi Sergei
>
> > > /*
> > > + * 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;
> >
> > Why not change the *for* statement itself to start with j = 1?
>
> It can be one solution. Actually my local 1st patch was such style.
> But I thought that it is difficult to notice such magical operation from code.
> Thus, I used this style
FWIIW, I think if you have a comment, like the one above, then j = 1 should
be obvious enough.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
2017-03-24 6:55 ` Simon Horman
@ 2017-03-24 8:32 ` Kuninori Morimoto
0 siblings, 0 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2017-03-24 8:32 UTC (permalink / raw)
To: Simon Horman
Cc: linux-renesas-soc, Linux-ALSA, Mark Brown, Hiroyuki Yokoyama,
Sergei Shtylyov
Hi Simon
> > > > /*
> > > > + * 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;
> > >
> > > Why not change the *for* statement itself to start with j = 1?
> >
> > It can be one solution. Actually my local 1st patch was such style.
> > But I thought that it is difficult to notice such magical operation from code.
> > Thus, I used this style
>
> FWIIW, I think if you have a comment, like the one above, then j = 1 should
> be obvious enough.
I'm OK for both, and have no special opinion about this.
Let's follow to ALSA SoC maintainer's opinion
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Applied "ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT" to the asoc tree
2017-03-22 4:02 [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT Kuninori Morimoto
2017-03-22 8:48 ` Sergei Shtylyov
@ 2017-03-24 19:16 ` Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2017-03-24 19:16 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Hiroyuki Yokoyama
The patch
ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 6b8530cc056efd4a11b034ca5b1e9f7e9563f553 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Wed, 22 Mar 2017 04:02:43 +0000
Subject: [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
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 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 411bda2387ad..135c5669f796 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -228,6 +228,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
* see rsnd_ssi_init()
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-24 19:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-22 4:02 [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT Kuninori Morimoto
2017-03-22 8:48 ` Sergei Shtylyov
2017-03-22 8:56 ` Kuninori Morimoto
2017-03-24 6:55 ` Simon Horman
2017-03-24 8:32 ` Kuninori Morimoto
2017-03-24 19:16 ` Applied "ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).