Skip to content

Commit 16d568c

Browse files
krzkvinodkoul
authored andcommitted
soundwire: qcom: handle command ignored interrupt
Qualcomm Soundwire v2.0.0 controller comes with new interrupt bit for ignored commands. Add code to handle it in the interrupt service routine. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 5d78c7d commit 16d568c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/soundwire/qcom.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
#define SWRM_INTERRUPT_STATUS_BUS_RESET_FINISHED_V2 BIT(13)
6161
#define SWRM_INTERRUPT_STATUS_CLK_STOP_FINISHED_V2 BIT(14)
6262
#define SWRM_INTERRUPT_STATUS_EXT_CLK_STOP_WAKEUP BIT(16)
63+
#define SWRM_INTERRUPT_STATUS_CMD_IGNORED_AND_EXEC_CONTINUED BIT(19)
6364
#define SWRM_INTERRUPT_MAX 17
6465
#define SWRM_V1_3_INTERRUPT_MASK_ADDR 0x204
6566
#define SWRM_V1_3_INTERRUPT_CLEAR 0x208
@@ -776,6 +777,17 @@ static irqreturn_t qcom_swrm_irq_handler(int irq, void *dev_id)
776777
break;
777778
case SWRM_INTERRUPT_STATUS_EXT_CLK_STOP_WAKEUP:
778779
break;
780+
case SWRM_INTERRUPT_STATUS_CMD_IGNORED_AND_EXEC_CONTINUED:
781+
ctrl->reg_read(ctrl,
782+
ctrl->reg_layout[SWRM_REG_CMD_FIFO_STATUS],
783+
&value);
784+
dev_err(ctrl->dev,
785+
"%s: SWR CMD ignored, fifo status %x\n",
786+
__func__, value);
787+
788+
/* Wait 3.5ms to clear */
789+
usleep_range(3500, 3505);
790+
break;
779791
default:
780792
dev_err_ratelimited(ctrl->dev,
781793
"%s: SWR unknown interrupt value: %d\n",

0 commit comments

Comments
 (0)