spi: cadence-quadspi: Abort read if dummy cycles required are too many
authorPratyush Yadav <p.yadav@ti.com>
Tue, 22 Dec 2020 18:44:20 +0000 (00:14 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 6 Jan 2021 13:08:42 +0000 (13:08 +0000)
commitceeda328edeeeeac7579e9dbf0610785a3b83d39
tree84b62a0f2ff34f7c28fc65b63d31ed43afcee59f
parent3a5c09c8d1ed9a7323f0e5c435021531f0865c16
spi: cadence-quadspi: Abort read if dummy cycles required are too many

The controller can only support up to 31 dummy cycles. If the command
requires more it falls back to using 31. This command is likely to fail
because the correct number of cycles are not waited upon. Rather than
silently issuing an incorrect command, fail loudly so the caller can get
a chance to find out the command can't be supported by the controller.

Fixes: 140623410536 ("mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller")
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20201222184425.7028-3-p.yadav@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-quadspi.c