linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
@ 2019-02-22  8:23 twischer
  2019-02-25  1:15 ` Kuninori Morimoto
  2019-10-22 15:49 ` [alsa-devel] " Eugeniu Rosca
  0 siblings, 2 replies; 8+ messages in thread
From: twischer @ 2019-02-22  8:23 UTC (permalink / raw)
  To: patch, broonie, kuninori.morimoto.gx, perex, tiwai
  Cc: alsa-devel, linux-kernel, Jiada Wang, Timo Wischer

From: Jiada Wang <jiada_wang@mentor.com>

Currently each SSI unit 's busif dma address is calculated by
following calculation formulation:
0xec540000 + 0x1000 * id + busif / 4 * 0xA000 + busif % 4 * 0x400

But according to user manual 41.1.4 Register Configuration
ssi9 4/5/6/7 busif data register address
(SSI9_4_BUSIF/SSI9_5_BUSIF/SSI9_6_BUSIF/SSI9_7_BUSIF)
are out of this rule.

This patch updates the calculation formulation to correct
ssi9 4/5/6/7 busif data register address

Fixes: commit 5e45a6fab3b9 ("ASoc: rsnd: dma: Calculate dma address with consider of BUSIF")
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
---
 sound/soc/sh/rcar/dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index 0324a5c..28f65eb 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -508,10 +508,10 @@ static struct rsnd_mod_ops rsnd_dmapp_ops = {
 #define RDMA_SSI_I_N(addr, i)	(addr ##_reg - 0x00300000 + (0x40 * i) + 0x8)
 #define RDMA_SSI_O_N(addr, i)	(addr ##_reg - 0x00300000 + (0x40 * i) + 0xc)
 
-#define RDMA_SSIU_I_N(addr, i, j) (addr ##_reg - 0x00441000 + (0x1000 * (i)) + (((j) / 4) * 0xA000) + (((j) % 4) * 0x400))
+#define RDMA_SSIU_I_N(addr, i, j) (addr ##_reg - 0x00441000 + (0x1000 * (i)) + (((j) / 4) * 0xA000) + (((j) % 4) * 0x400) - (0x4000 * ((i) / 9) * ((j) / 4)))
 #define RDMA_SSIU_O_N(addr, i, j) RDMA_SSIU_I_N(addr, i, j)
 
-#define RDMA_SSIU_I_P(addr, i, j) (addr ##_reg - 0x00141000 + (0x1000 * (i)) + (((j) / 4) * 0xA000) + (((j) % 4) * 0x400))
+#define RDMA_SSIU_I_P(addr, i, j) (addr ##_reg - 0x00141000 + (0x1000 * (i)) + (((j) / 4) * 0xA000) + (((j) % 4) * 0x400) - (0x4000 * ((i) / 9) * ((j) / 4)))
 #define RDMA_SSIU_O_P(addr, i, j) RDMA_SSIU_I_P(addr, i, j)
 
 #define RDMA_SRC_I_N(addr, i)	(addr ##_reg - 0x00500000 + (0x400 * i))
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
  2019-02-22  8:23 [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address twischer
@ 2019-02-25  1:15 ` Kuninori Morimoto
  2019-02-25  1:18   ` Kuninori Morimoto
  2019-10-22 15:49 ` [alsa-devel] " Eugeniu Rosca
  1 sibling, 1 reply; 8+ messages in thread
From: Kuninori Morimoto @ 2019-02-25  1:15 UTC (permalink / raw)
  To: twischer
  Cc: patch, broonie, perex, tiwai, alsa-devel, linux-kernel, Jiada Wang


Hi Jiada

Thank you for your patch

> Currently each SSI unit 's busif dma address is calculated by
> following calculation formulation:
> 0xec540000 + 0x1000 * id + busif / 4 * 0xA000 + busif % 4 * 0x400
> 
> But according to user manual 41.1.4 Register Configuration
> ssi9 4/5/6/7 busif data register address
> (SSI9_4_BUSIF/SSI9_5_BUSIF/SSI9_6_BUSIF/SSI9_7_BUSIF)
> are out of this rule.
> 
> This patch updates the calculation formulation to correct
> ssi9 4/5/6/7 busif data register address
> 
> Fixes: commit 5e45a6fab3b9 ("ASoc: rsnd: dma: Calculate dma address with consider of BUSIF")
> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
> ---

We don't need below anymore by this patch ?

	--- dma.c ----
	/*
	 * FIXME
	 *
	 * We can't support SSI9-4/5/6/7, because its address is
	 * out of calculation rule
	 */
	if ((id == 9) && (busif >= 4))
		dev_err(dev, "This driver doesn't support SSI%d-%d, so far",
			id, busif);



Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
  2019-02-25  1:15 ` Kuninori Morimoto
@ 2019-02-25  1:18   ` Kuninori Morimoto
  0 siblings, 0 replies; 8+ messages in thread
From: Kuninori Morimoto @ 2019-02-25  1:18 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: twischer, patch, broonie, perex, tiwai, alsa-devel, linux-kernel,
	Jiada Wang


Hi Jiada, again

> > Currently each SSI unit 's busif dma address is calculated by
> > following calculation formulation:
> > 0xec540000 + 0x1000 * id + busif / 4 * 0xA000 + busif % 4 * 0x400
> > 
> > But according to user manual 41.1.4 Register Configuration
> > ssi9 4/5/6/7 busif data register address
> > (SSI9_4_BUSIF/SSI9_5_BUSIF/SSI9_6_BUSIF/SSI9_7_BUSIF)
> > are out of this rule.
> > 
> > This patch updates the calculation formulation to correct
> > ssi9 4/5/6/7 busif data register address
> > 
> > Fixes: commit 5e45a6fab3b9 ("ASoc: rsnd: dma: Calculate dma address with consider of BUSIF")
> > Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
> > Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
> > ---
> 
> We don't need below anymore by this patch ?
> 
> 	--- dma.c ----
> 	/*
> 	 * FIXME
> 	 *
> 	 * We can't support SSI9-4/5/6/7, because its address is
> 	 * out of calculation rule
> 	 */
> 	if ((id == 9) && (busif >= 4))
> 		dev_err(dev, "This driver doesn't support SSI%d-%d, so far",
> 			id, busif);

Oops, next patch is removing this.
Please ignore this mail.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
  2019-02-22  8:23 [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address twischer
  2019-02-25  1:15 ` Kuninori Morimoto
@ 2019-10-22 15:49 ` Eugeniu Rosca
  2019-10-22 16:35   ` Mark Brown
  1 sibling, 1 reply; 8+ messages in thread
From: Eugeniu Rosca @ 2019-10-22 15:49 UTC (permalink / raw)
  To: kuninori.morimoto.gx
  Cc: patch, broonie, twischer, perex, tiwai, Jiada Wang, alsa-devel,
	linux-kernel, Eugeniu Rosca, Eugeniu Rosca

Hi Morimoto-san,

On Fri, Feb 22, 2019 at 09:23:23AM +0100, twischer@de.adit-jv.com wrote:
> From: Jiada Wang <jiada_wang@mentor.com>
> 
> Currently each SSI unit 's busif dma address is calculated by
> following calculation formulation:
> 0xec540000 + 0x1000 * id + busif / 4 * 0xA000 + busif % 4 * 0x400
> 
> But according to user manual 41.1.4 Register Configuration
> ssi9 4/5/6/7 busif data register address
> (SSI9_4_BUSIF/SSI9_5_BUSIF/SSI9_6_BUSIF/SSI9_7_BUSIF)
> are out of this rule.
> 
> This patch updates the calculation formulation to correct
> ssi9 4/5/6/7 busif data register address
> 
> Fixes: commit 5e45a6fab3b9 ("ASoc: rsnd: dma: Calculate dma address with consider of BUSIF")
> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
> ---
>  sound/soc/sh/rcar/dma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
> index 0324a5c..28f65eb 100644
> --- a/sound/soc/sh/rcar/dma.c
> +++ b/sound/soc/sh/rcar/dma.c
> @@ -508,10 +508,10 @@ static struct rsnd_mod_ops rsnd_dmapp_ops = {
>  #define RDMA_SSI_I_N(addr, i)	(addr ##_reg - 0x00300000 + (0x40 * i) + 0x8)
>  #define RDMA_SSI_O_N(addr, i)	(addr ##_reg - 0x00300000 + (0x40 * i) + 0xc)
>  
> -#define RDMA_SSIU_I_N(addr, i, j) (addr ##_reg - 0x00441000 + (0x1000 * (i)) + (((j) / 4) * 0xA000) + (((j) % 4) * 0x400))
> +#define RDMA_SSIU_I_N(addr, i, j) (addr ##_reg - 0x00441000 + (0x1000 * (i)) + (((j) / 4) * 0xA000) + (((j) % 4) * 0x400) - (0x4000 * ((i) / 9) * ((j) / 4)))
>  #define RDMA_SSIU_O_N(addr, i, j) RDMA_SSIU_I_N(addr, i, j)
>  
> -#define RDMA_SSIU_I_P(addr, i, j) (addr ##_reg - 0x00141000 + (0x1000 * (i)) + (((j) / 4) * 0xA000) + (((j) % 4) * 0x400))
> +#define RDMA_SSIU_I_P(addr, i, j) (addr ##_reg - 0x00141000 + (0x1000 * (i)) + (((j) / 4) * 0xA000) + (((j) % 4) * 0x400) - (0x4000 * ((i) / 9) * ((j) / 4)))
>  #define RDMA_SSIU_O_P(addr, i, j) RDMA_SSIU_I_P(addr, i, j)
>  
>  #define RDMA_SRC_I_N(addr, i)	(addr ##_reg - 0x00500000 + (0x400 * i))

Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>

This patch lives in our tree for a while without any issues.
It still applies cleanly to v5.4-rc4-18-g3b7c59a1950c.
Any chance to see it in vanilla?

-- 
Best Regards,
Eugeniu

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
  2019-10-22 15:49 ` [alsa-devel] " Eugeniu Rosca
@ 2019-10-22 16:35   ` Mark Brown
  2019-10-22 16:46     ` Eugeniu Rosca
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2019-10-22 16:35 UTC (permalink / raw)
  To: Eugeniu Rosca
  Cc: kuninori.morimoto.gx, patch, twischer, perex, tiwai, Jiada Wang,
	alsa-devel, linux-kernel, Eugeniu Rosca

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

On Tue, Oct 22, 2019 at 05:49:04PM +0200, Eugeniu Rosca wrote:

> It still applies cleanly to v5.4-rc4-18-g3b7c59a1950c.
> Any chance to see it in vanilla?

Someone would need to resend it.  No idea what the issues are but I
don't have it any more.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
  2019-10-22 16:35   ` Mark Brown
@ 2019-10-22 16:46     ` Eugeniu Rosca
  2019-10-22 16:53       ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Eugeniu Rosca @ 2019-10-22 16:46 UTC (permalink / raw)
  To: Mark Brown
  Cc: Eugeniu Rosca, kuninori.morimoto.gx, patch, twischer, perex,
	tiwai, Jiada Wang, alsa-devel, linux-kernel, Eugeniu Rosca

Hi Mark,

Thanks for the prompt reply.

On Tue, Oct 22, 2019 at 05:35:01PM +0100, Mark Brown wrote:
> On Tue, Oct 22, 2019 at 05:49:04PM +0200, Eugeniu Rosca wrote:
> 
> > It still applies cleanly to v5.4-rc4-18-g3b7c59a1950c.
> > Any chance to see it in vanilla?
> 
> Someone would need to resend it.  No idea what the issues are but I
> don't have it any more.

How about downloading it from [1] by pressing on the "mbox" button and
applying it with "git am"? This will also include any
"*-by: Name <E-mail>" signatures found in the thread.

If this doesn't match your workflow, I can resend it.

[1] https://patchwork.kernel.org/patch/10825513/
    ("ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address")

-- 
Best Regards,
Eugeniu

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
  2019-10-22 16:46     ` Eugeniu Rosca
@ 2019-10-22 16:53       ` Mark Brown
  2019-10-22 18:59         ` Eugeniu Rosca
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2019-10-22 16:53 UTC (permalink / raw)
  To: Eugeniu Rosca
  Cc: kuninori.morimoto.gx, patch, twischer, perex, tiwai, Jiada Wang,
	alsa-devel, linux-kernel, Eugeniu Rosca

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

On Tue, Oct 22, 2019 at 06:46:07PM +0200, Eugeniu Rosca wrote:
> On Tue, Oct 22, 2019 at 05:35:01PM +0100, Mark Brown wrote:
> > On Tue, Oct 22, 2019 at 05:49:04PM +0200, Eugeniu Rosca wrote:

> > > It still applies cleanly to v5.4-rc4-18-g3b7c59a1950c.
> > > Any chance to see it in vanilla?

> > Someone would need to resend it.  No idea what the issues are but I
> > don't have it any more.

> How about downloading it from [1] by pressing on the "mbox" button and
> applying it with "git am"? This will also include any
> "*-by: Name <E-mail>" signatures found in the thread.

> If this doesn't match your workflow, I can resend it.

This doesn't match either my workflow or the kernel's workflow in
general, please resend - that means that not only I but also other
people on the list have the chance to see the patch and review it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
  2019-10-22 16:53       ` Mark Brown
@ 2019-10-22 18:59         ` Eugeniu Rosca
  0 siblings, 0 replies; 8+ messages in thread
From: Eugeniu Rosca @ 2019-10-22 18:59 UTC (permalink / raw)
  To: Mark Brown
  Cc: Eugeniu Rosca, kuninori.morimoto.gx, patch, twischer, perex,
	tiwai, Jiada Wang, alsa-devel, linux-kernel, Eugeniu Rosca

On Tue, Oct 22, 2019 at 05:53:37PM +0100, Mark Brown wrote:
> On Tue, Oct 22, 2019 at 06:46:07PM +0200, Eugeniu Rosca wrote:
> > On Tue, Oct 22, 2019 at 05:35:01PM +0100, Mark Brown wrote:
> > > On Tue, Oct 22, 2019 at 05:49:04PM +0200, Eugeniu Rosca wrote:
> 
> > > > It still applies cleanly to v5.4-rc4-18-g3b7c59a1950c.
> > > > Any chance to see it in vanilla?
> 
> > > Someone would need to resend it.  No idea what the issues are but I
> > > don't have it any more.
> 
> > How about downloading it from [1] by pressing on the "mbox" button and
> > applying it with "git am"? This will also include any
> > "*-by: Name <E-mail>" signatures found in the thread.
> 
> > If this doesn't match your workflow, I can resend it.
> 
> This doesn't match either my workflow or the kernel's workflow in
> general, please resend - that means that not only I but also other
> people on the list have the chance to see the patch and review it.

Resent as https://patchwork.kernel.org/patch/11205195/
("[RESEND] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address")

-- 
Best Regards,
Eugeniu

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-22 18:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22  8:23 [PATCH] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address twischer
2019-02-25  1:15 ` Kuninori Morimoto
2019-02-25  1:18   ` Kuninori Morimoto
2019-10-22 15:49 ` [alsa-devel] " Eugeniu Rosca
2019-10-22 16:35   ` Mark Brown
2019-10-22 16:46     ` Eugeniu Rosca
2019-10-22 16:53       ` Mark Brown
2019-10-22 18:59         ` Eugeniu Rosca

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).