summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-dw.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-03-09 18:11:06 +0000
committerMark Brown <broonie@kernel.org>2015-03-09 18:11:06 +0000
commit0365fbd4bbc0b8f3fd3c78c16a8020ea83b3afcf (patch)
tree9263cd059b6aab29541b00ad2eceb4df1abcb486 /drivers/spi/spi-dw.c
parentc22c62db3f7388422257918c9d2582ef20d2e12d (diff)
parent854d2f241d71f6ca08ccde30e6c7c2e403363e52 (diff)
Merge branch 'fix/dw' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-dw
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r--drivers/spi/spi-dw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 7d3ee82e10be..950bc50361b3 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -517,14 +517,14 @@ static void spi_hw_init(struct device *dev, struct dw_spi *dws)
if (!dws->fifo_len) {
u32 fifo;
- for (fifo = 2; fifo <= 256; fifo++) {
+ for (fifo = 1; fifo < 256; fifo++) {
dw_writew(dws, DW_SPI_TXFLTR, fifo);
if (fifo != dw_readw(dws, DW_SPI_TXFLTR))
break;
}
dw_writew(dws, DW_SPI_TXFLTR, 0);
- dws->fifo_len = (fifo == 2) ? 0 : fifo - 1;
+ dws->fifo_len = (fifo == 1) ? 0 : fifo;
dev_dbg(dev, "Detected FIFO size: %u bytes\n", dws->fifo_len);
}
}