spi: cadence-quadspi: Set dummy cycles from STIG commands
authorPratyush Yadav <p.yadav@ti.com>
Tue, 22 Dec 2020 18:44:21 +0000 (00:14 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 6 Jan 2021 13:08:43 +0000 (13:08 +0000)
commit888d517b992532df2b6115fbdc9620673ca7c651
tree03f732189dad8130d5954d70b8e192f64f446562
parentceeda328edeeeeac7579e9dbf0610785a3b83d39
spi: cadence-quadspi: Set dummy cycles from STIG commands

If a command does not have an address phase it goes via the STIG path.
The dummy cycles are not initialized for the STIG commands. As a result,
STIG commands with dummy cycles will not work.

Initialize the dummy cycle field before issuing the STIG command to make
sure it is sent correctly. Move the code to calculate dummy cycle value
to a separate function so it is not repeated twice. DTR support will add
some more logic here to it is worth it to extract it out in a function.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20201222184425.7028-4-p.yadav@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-quadspi.c