summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-espi.c
diff options
context:
space:
mode:
authorTiago Brusamarello <tiago.brusamarello@datacom.ind.br>2018-07-26 16:12:11 +0200
committerMark Brown <broonie@kernel.org>2018-07-26 16:43:09 +0200
commit516ddd79068dc02b9101bf9551a9ef7dce217b5b (patch)
tree04ab6d8c0a7e74d65a96d76f678107206a4e4edd /drivers/spi/spi-fsl-espi.c
parentspi: imx: Use the longuest possible burst size when in dynamic_burst (diff)
downloadlinux-516ddd79068dc02b9101bf9551a9ef7dce217b5b.tar.xz
linux-516ddd79068dc02b9101bf9551a9ef7dce217b5b.zip
spi: spi-fsl-espi: Log fifo counters on error
Log RX and TX fifo counters when a transfer is done and these are not zero. Signed-off-by: Tiago Brusamarello <tiago.brusamarello@datacom.ind.br> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-fsl-espi.c')
-rw-r--r--drivers/spi/spi-fsl-espi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index 1d332e23f6ed..1e8ff6256079 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -547,8 +547,11 @@ static void fsl_espi_cpu_irq(struct fsl_espi *espi, u32 events)
dev_err(espi->dev,
"Transfer done but SPIE_DON isn't set!\n");
- if (SPIE_RXCNT(events) || SPIE_TXCNT(events) != FSL_ESPI_FIFO_SIZE)
+ if (SPIE_RXCNT(events) || SPIE_TXCNT(events) != FSL_ESPI_FIFO_SIZE) {
dev_err(espi->dev, "Transfer done but rx/tx fifo's aren't empty!\n");
+ dev_err(espi->dev, "SPIE_RXCNT = %d, SPIE_TXCNT = %d\n",
+ SPIE_RXCNT(events), SPIE_TXCNT(events));
+ }
complete(&espi->done);
}