All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soundwire: cadence: Write to correct address for each FIFO chunk
@ 2022-09-17 12:35 ` Richard Fitzgerald
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Fitzgerald @ 2022-09-17 12:35 UTC (permalink / raw)
  To: vkoul, yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale
  Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald

_cdns_xfer_msg() must add the fragment offset to msg->addr to get the
base target address of each FIFO chunk. Otherwise every chunk will
be written to the first 32 register addresses.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 drivers/soundwire/cadence_master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index 3ef472049980..ca241bbeadd9 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -569,7 +569,7 @@ _cdns_xfer_msg(struct sdw_cdns *cdns, struct sdw_msg *msg, int cmd,
 	}
 
 	base = CDNS_MCP_CMD_BASE;
-	addr = msg->addr;
+	addr = msg->addr + offset;
 
 	for (i = 0; i < count; i++) {
 		data = FIELD_PREP(CDNS_MCP_CMD_DEV_ADDR, msg->dev_num);
-- 
2.30.2


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

* [PATCH] soundwire: cadence: Write to correct address for each FIFO chunk
@ 2022-09-17 12:35 ` Richard Fitzgerald
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Fitzgerald @ 2022-09-17 12:35 UTC (permalink / raw)
  To: vkoul, yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale
  Cc: patches, alsa-devel, Richard Fitzgerald, linux-kernel

_cdns_xfer_msg() must add the fragment offset to msg->addr to get the
base target address of each FIFO chunk. Otherwise every chunk will
be written to the first 32 register addresses.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 drivers/soundwire/cadence_master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index 3ef472049980..ca241bbeadd9 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -569,7 +569,7 @@ _cdns_xfer_msg(struct sdw_cdns *cdns, struct sdw_msg *msg, int cmd,
 	}
 
 	base = CDNS_MCP_CMD_BASE;
-	addr = msg->addr;
+	addr = msg->addr + offset;
 
 	for (i = 0; i < count; i++) {
 		data = FIELD_PREP(CDNS_MCP_CMD_DEV_ADDR, msg->dev_num);
-- 
2.30.2


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

* Re: [PATCH] soundwire: cadence: Write to correct address for each FIFO chunk
  2022-09-17 12:35 ` Richard Fitzgerald
@ 2022-09-19  8:39   ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2022-09-19  8:39 UTC (permalink / raw)
  To: Richard Fitzgerald, vkoul, yung-chuan.liao, sanyog.r.kale
  Cc: alsa-devel, linux-kernel, patches



On 9/17/22 14:35, Richard Fitzgerald wrote:
> _cdns_xfer_msg() must add the fragment offset to msg->addr to get the
> base target address of each FIFO chunk. Otherwise every chunk will
> be written to the first 32 register addresses.
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---
>  drivers/soundwire/cadence_master.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
> index 3ef472049980..ca241bbeadd9 100644
> --- a/drivers/soundwire/cadence_master.c
> +++ b/drivers/soundwire/cadence_master.c
> @@ -569,7 +569,7 @@ _cdns_xfer_msg(struct sdw_cdns *cdns, struct sdw_msg *msg, int cmd,
>  	}
>  
>  	base = CDNS_MCP_CMD_BASE;
> -	addr = msg->addr;
> +	addr = msg->addr + offset;

LGTM, probably means that sending a large command broken in several
pieces never worked. D'oh.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Thanks Richard!

>  
>  	for (i = 0; i < count; i++) {
>  		data = FIELD_PREP(CDNS_MCP_CMD_DEV_ADDR, msg->dev_num);

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

* Re: [PATCH] soundwire: cadence: Write to correct address for each FIFO chunk
@ 2022-09-19  8:39   ` Pierre-Louis Bossart
  0 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2022-09-19  8:39 UTC (permalink / raw)
  To: Richard Fitzgerald, vkoul, yung-chuan.liao, sanyog.r.kale
  Cc: patches, alsa-devel, linux-kernel



On 9/17/22 14:35, Richard Fitzgerald wrote:
> _cdns_xfer_msg() must add the fragment offset to msg->addr to get the
> base target address of each FIFO chunk. Otherwise every chunk will
> be written to the first 32 register addresses.
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---
>  drivers/soundwire/cadence_master.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
> index 3ef472049980..ca241bbeadd9 100644
> --- a/drivers/soundwire/cadence_master.c
> +++ b/drivers/soundwire/cadence_master.c
> @@ -569,7 +569,7 @@ _cdns_xfer_msg(struct sdw_cdns *cdns, struct sdw_msg *msg, int cmd,
>  	}
>  
>  	base = CDNS_MCP_CMD_BASE;
> -	addr = msg->addr;
> +	addr = msg->addr + offset;

LGTM, probably means that sending a large command broken in several
pieces never worked. D'oh.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Thanks Richard!

>  
>  	for (i = 0; i < count; i++) {
>  		data = FIELD_PREP(CDNS_MCP_CMD_DEV_ADDR, msg->dev_num);

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

* Re: [PATCH] soundwire: cadence: Write to correct address for each FIFO chunk
  2022-09-17 12:35 ` Richard Fitzgerald
@ 2022-09-20  5:06   ` Vinod Koul
  -1 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2022-09-20  5:06 UTC (permalink / raw)
  To: Richard Fitzgerald
  Cc: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale, alsa-devel,
	linux-kernel, patches

On 17-09-22, 13:35, Richard Fitzgerald wrote:
> _cdns_xfer_msg() must add the fragment offset to msg->addr to get the
> base target address of each FIFO chunk. Otherwise every chunk will
> be written to the first 32 register addresses.

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH] soundwire: cadence: Write to correct address for each FIFO chunk
@ 2022-09-20  5:06   ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2022-09-20  5:06 UTC (permalink / raw)
  To: Richard Fitzgerald
  Cc: alsa-devel, patches, pierre-louis.bossart, linux-kernel,
	sanyog.r.kale, yung-chuan.liao

On 17-09-22, 13:35, Richard Fitzgerald wrote:
> _cdns_xfer_msg() must add the fragment offset to msg->addr to get the
> base target address of each FIFO chunk. Otherwise every chunk will
> be written to the first 32 register addresses.

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2022-09-20  5:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-17 12:35 [PATCH] soundwire: cadence: Write to correct address for each FIFO chunk Richard Fitzgerald
2022-09-17 12:35 ` Richard Fitzgerald
2022-09-19  8:39 ` Pierre-Louis Bossart
2022-09-19  8:39   ` Pierre-Louis Bossart
2022-09-20  5:06 ` Vinod Koul
2022-09-20  5:06   ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.