diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2023-07-28 13:28:48 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-09-21 11:32:05 +0200 |
commit | 16d568c8f646933710c980783d87d3f59a89b563 (patch) | |
tree | 8cdb89a41c3d5f9d1c454c0bf8d8ff0179259c6f /drivers/soundwire/qcom.c | |
parent | 5d78c7d684192e42241593a936ee60003d8ac064 (diff) | |
download | linux-16d568c8f646933710c980783d87d3f59a89b563.tar.gz linux-16d568c8f646933710c980783d87d3f59a89b563.tar.bz2 linux-16d568c8f646933710c980783d87d3f59a89b563.zip |
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 <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230728112848.67092-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/qcom.c')
-rw-r--r-- | drivers/soundwire/qcom.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 3f40e348f6fb..d0bb995a59ef 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -60,6 +60,7 @@ #define SWRM_INTERRUPT_STATUS_BUS_RESET_FINISHED_V2 BIT(13) #define SWRM_INTERRUPT_STATUS_CLK_STOP_FINISHED_V2 BIT(14) #define SWRM_INTERRUPT_STATUS_EXT_CLK_STOP_WAKEUP BIT(16) +#define SWRM_INTERRUPT_STATUS_CMD_IGNORED_AND_EXEC_CONTINUED BIT(19) #define SWRM_INTERRUPT_MAX 17 #define SWRM_V1_3_INTERRUPT_MASK_ADDR 0x204 #define SWRM_V1_3_INTERRUPT_CLEAR 0x208 @@ -776,6 +777,17 @@ static irqreturn_t qcom_swrm_irq_handler(int irq, void *dev_id) break; case SWRM_INTERRUPT_STATUS_EXT_CLK_STOP_WAKEUP: break; + case SWRM_INTERRUPT_STATUS_CMD_IGNORED_AND_EXEC_CONTINUED: + ctrl->reg_read(ctrl, + ctrl->reg_layout[SWRM_REG_CMD_FIFO_STATUS], + &value); + dev_err(ctrl->dev, + "%s: SWR CMD ignored, fifo status %x\n", + __func__, value); + + /* Wait 3.5ms to clear */ + usleep_range(3500, 3505); + break; default: dev_err_ratelimited(ctrl->dev, "%s: SWR unknown interrupt value: %d\n", |