diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-07-12 19:41:14 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-07-12 19:41:14 +0300 |
commit | 63f04777162181798399a2c4e5436d0d0c16291b (patch) | |
tree | 3c2439bcba855250eb5f86a70b6f4d27a0b3b1f9 /drivers | |
parent | c25c74b7476e27180e9b76840e963e542023f118 (diff) | |
parent | aa7eee8a143a7e8b530eb1e75fb86cae793d1e21 (diff) | |
download | linux-63f04777162181798399a2c4e5436d0d0c16291b.tar.xz |
Merge tag 'mtd/fixes-for-4.18-rc5' of git://git.infradead.org/linux-mtd
Pull MTD fix from Boris Brezillon:
"A SPI NOR fix to fix a timeout in the cadence QSPI controller driver"
* tag 'mtd/fixes-for-4.18-rc5' of git://git.infradead.org/linux-mtd:
mtd: spi-nor: cadence-quadspi: Fix direct mode write timeouts
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/spi-nor/cadence-quadspi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c index c3f7aaa5d18f..d7e10b36a0b9 100644 --- a/drivers/mtd/spi-nor/cadence-quadspi.c +++ b/drivers/mtd/spi-nor/cadence-quadspi.c @@ -926,10 +926,12 @@ static ssize_t cqspi_write(struct spi_nor *nor, loff_t to, if (ret) return ret; - if (f_pdata->use_direct_mode) + if (f_pdata->use_direct_mode) { memcpy_toio(cqspi->ahb_base + to, buf, len); - else + ret = cqspi_wait_idle(cqspi); + } else { ret = cqspi_indirect_write_execute(nor, to, buf, len); + } if (ret) return ret; |