summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/cadence_master.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2020-03-17 11:33:23 -0500
committerVinod Koul <vkoul@kernel.org>2020-03-19 12:43:04 +0530
commitb62e76cf3958ae23b5c844738990c5cf8efce8e4 (patch)
treec115bdef4030aabb2b9c02cbe51879de2c63add8 /drivers/soundwire/cadence_master.c
parent1dd6a17f35d7abd604214fddd8f1a102a3504b9a (diff)
downloadlinux-b62e76cf3958ae23b5c844738990c5cf8efce8e4.tar.gz
linux-b62e76cf3958ae23b5c844738990c5cf8efce8e4.tar.bz2
linux-b62e76cf3958ae23b5c844738990c5cf8efce8e4.zip
soundwire: cadence: reorder MCP_CONFIG settings
Follow hardware programming flows and add placeholder comment for multi-master mode. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200317163329.25501-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/cadence_master.c')
-rw-r--r--drivers/soundwire/cadence_master.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index 773341568d7e..9afce1f32076 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -1097,20 +1097,22 @@ int sdw_cdns_init(struct sdw_cdns *cdns)
/* Configure mcp config */
val = cdns_readl(cdns, CDNS_MCP_CONFIG);
- /* Set Max cmd retry to 15 */
- val |= CDNS_MCP_CONFIG_MCMD_RETRY;
+ /* Set cmd mode for Tx and Rx cmds */
+ val &= ~CDNS_MCP_CONFIG_CMD;
- /* Set frame delay between PREQ and ping frame to 15 frames */
- val |= 0xF << SDW_REG_SHIFT(CDNS_MCP_CONFIG_MPREQ_DELAY);
+ /* Disable sniffer mode */
+ val &= ~CDNS_MCP_CONFIG_SNIFFER;
/* Disable auto bus release */
val &= ~CDNS_MCP_CONFIG_BUS_REL;
- /* Disable sniffer mode */
- val &= ~CDNS_MCP_CONFIG_SNIFFER;
+ /* Multi-master support to be added here */
- /* Set cmd mode for Tx and Rx cmds */
- val &= ~CDNS_MCP_CONFIG_CMD;
+ /* Set frame delay between PREQ and ping frame to 15 frames */
+ val |= 0xF << SDW_REG_SHIFT(CDNS_MCP_CONFIG_MPREQ_DELAY);
+
+ /* Set Max cmd retry to 15 */
+ val |= CDNS_MCP_CONFIG_MCMD_RETRY;
cdns_writel(cdns, CDNS_MCP_CONFIG, val);