summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/cadence_master.c
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2022-09-17 14:35:17 +0200
committerVinod Koul <vkoul@kernel.org>2022-09-20 07:06:07 +0200
commit3ed96fb4a6d8426f766687ff02fc5fb5f91575fd (patch)
tree19119718fb29d80586dc539739e715c0588b9bd0 /drivers/soundwire/cadence_master.c
parentsoundwire: bus: Fix wrong port number in sdw_handle_slave_alerts() (diff)
downloadlinux-3ed96fb4a6d8426f766687ff02fc5fb5f91575fd.tar.xz
linux-3ed96fb4a6d8426f766687ff02fc5fb5f91575fd.zip
soundwire: cadence: Write to correct address for each FIFO chunk
_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> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220917123517.229153-1-rf@opensource.cirrus.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/cadence_master.c')
-rw-r--r--drivers/soundwire/cadence_master.c2
1 files changed, 1 insertions, 1 deletions
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);