summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-geni-qcom.c
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2020-06-18 08:06:24 -0700
committerMark Brown <broonie@kernel.org>2020-06-19 13:25:18 +0100
commite191a082d764e80a36c198da61fbf2851ebf425a (patch)
tree5261ddb3aaa1545ef919082673e979e77c0e42b0 /drivers/spi/spi-geni-qcom.c
parent2ee471a1e28ec79fbfcdc8900ed0ed74132b0efe (diff)
downloadlwn-e191a082d764e80a36c198da61fbf2851ebf425a.tar.gz
lwn-e191a082d764e80a36c198da61fbf2851ebf425a.zip
spi: spi-geni-qcom: Check for error IRQs
>From reading the #defines it seems like we should shout if we ever see one of these error bits. Let's do so. This doesn't do anything functional except print a yell in the log if the error bits are seen. Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20200618080459.v4.3.Id8bebdbdb4d2ed9468634343a7e6207d6cffff8a@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-geni-qcom.c')
-rw-r--r--drivers/spi/spi-geni-qcom.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 7d022ccb1b6c..11f36d237c77 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -506,6 +506,11 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
if (!m_irq)
return IRQ_NONE;
+ if (m_irq & (M_CMD_OVERRUN_EN | M_ILLEGAL_CMD_EN | M_CMD_FAILURE_EN |
+ M_RX_FIFO_RD_ERR_EN | M_RX_FIFO_WR_ERR_EN |
+ M_TX_FIFO_RD_ERR_EN | M_TX_FIFO_WR_ERR_EN))
+ dev_warn(mas->dev, "Unexpected IRQ err status %#010x\n", m_irq);
+
spin_lock(&mas->lock);
if ((m_irq & M_RX_FIFO_WATERMARK_EN) || (m_irq & M_RX_FIFO_LAST_EN))