diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-07-12 18:41:14 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-07-12 18:41:14 +0200 |
commit | 63f04777162181798399a2c4e5436d0d0c16291b (patch) | |
tree | 3c2439bcba855250eb5f86a70b6f4d27a0b3b1f9 /drivers | |
parent | Merge tag 'trace-v4.18-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | mtd: spi-nor: cadence-quadspi: Fix direct mode write timeouts (diff) | |
download | linux-63f04777162181798399a2c4e5436d0d0c16291b.tar.xz linux-63f04777162181798399a2c4e5436d0d0c16291b.zip |
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; |