spi: cadence-qspi: Do not calibrate when device tree sets read delay
authorPratyush Yadav <p.yadav@ti.com>
Fri, 25 Jun 2021 19:17:07 +0000 (00:47 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 28 Jun 2021 06:26:53 +0000 (11:56 +0530)
commitbd8c8dcd4d6fb1cf726d5a267be5ec33c93f1471
tree593746c7fd27a05997405206d3d1fa1411cb3e81
parent5752d6ae8daacbd2678cbf9a96627dd9c83f215c
spi: cadence-qspi: Do not calibrate when device tree sets read delay

If the device tree provides a read delay value, use that directly and do
not perform the calibration procedure.

This allows the device tree to over-ride the read delay value in cases
where the read delay value obtained via calibration is incorrect. One
such example is the Cypress Semper flash. It needs a read delay of 4 in
octal DTR mode. But since the calibration procedure is run before the
flash is switched in octal DTR mode, it yields a read delay of 2. A
value of 4 works for both octal DTR and legacy modes.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/cadence_qspi.c
drivers/spi/cadence_qspi.h