Skip to content

Commit 542d349

Browse files
Srinivas-Kandagatlavinodkoul
authored andcommitted
soundwire: qcom: set continue execution flag for ignored commands
version 1.5.1 and higher IPs of this controller required to set continue execution on ignored command flag. This patch sets this flag. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210330144719.13284-4-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 128eaf9 commit 542d349

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/soundwire/qcom.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#define SWRM_CMD_FIFO_CMD 0x308
4141
#define SWRM_CMD_FIFO_STATUS 0x30C
4242
#define SWRM_CMD_FIFO_CFG_ADDR 0x314
43+
#define SWRM_CONTINUE_EXEC_ON_CMD_IGNORE BIT(31)
4344
#define SWRM_RD_WR_CMD_RETRIES 0x7
4445
#define SWRM_CMD_FIFO_RD_FIFO_ADDR 0x318
4546
#define SWRM_ENUMERATOR_CFG_ADDR 0x500
@@ -343,7 +344,15 @@ static int qcom_swrm_init(struct qcom_swrm_ctrl *ctrl)
343344
ctrl->reg_write(ctrl, SWRM_MCP_CFG_ADDR, val);
344345

345346
/* Configure number of retries of a read/write cmd */
346-
ctrl->reg_write(ctrl, SWRM_CMD_FIFO_CFG_ADDR, SWRM_RD_WR_CMD_RETRIES);
347+
if (ctrl->version > 0x01050001) {
348+
/* Only for versions >= 1.5.1 */
349+
ctrl->reg_write(ctrl, SWRM_CMD_FIFO_CFG_ADDR,
350+
SWRM_RD_WR_CMD_RETRIES |
351+
SWRM_CONTINUE_EXEC_ON_CMD_IGNORE);
352+
} else {
353+
ctrl->reg_write(ctrl, SWRM_CMD_FIFO_CFG_ADDR,
354+
SWRM_RD_WR_CMD_RETRIES);
355+
}
347356

348357
/* Set IRQ to PULSE */
349358
ctrl->reg_write(ctrl, SWRM_COMP_CFG_ADDR,

0 commit comments

Comments
 (0)