summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-rockchip.c
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2014-09-03 13:44:26 -0700
committerMark Brown <broonie@kernel.org>2014-09-04 23:54:11 +0100
commit62946172c81578477fcbb26478aebaa31353488d (patch)
tree9e274b45ca36ec40a60921ff1d96641b10ca1241 /drivers/spi/spi-rockchip.c
parent64bc0110f1ec905b1676b5ef60c1cc5b1799e1b6 (diff)
spi/rockchip: Don't warn if SPI is busy but disabled
The reference manual from Rockchip claims this about the BSF (SPI Busy Flag): * 0 - SPI is idle or disabled * 1 - SPI is actively transferring data The above doesn't quite appear to be true. Specifically I found the busy bit set when SPI was disabled. Let's change the WARN_ON() so we only check the busy bit if the controller was enabled. Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-rockchip.c')
-rw-r--r--drivers/spi/spi-rockchip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index 2a31bc2d3fd3..514f8e73b8e1 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -529,7 +529,8 @@ static int rockchip_spi_transfer_one(
int ret = 0;
struct rockchip_spi *rs = spi_master_get_devdata(master);
- WARN_ON((readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY));
+ WARN_ON(readl_relaxed(rs->regs + ROCKCHIP_SPI_SSIENR) &&
+ (readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY));
if (!xfer->tx_buf && !xfer->rx_buf) {
dev_err(rs->dev, "No buffer for transfer\n");