From bd8c8dcd4d6fb1cf726d5a267be5ec33c93f1471 Mon Sep 17 00:00:00 2001 From: Pratyush Yadav Date: Sat, 26 Jun 2021 00:47:07 +0530 Subject: 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 Reviewed-by: Jagan Teki --- drivers/spi/cadence_qspi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/spi/cadence_qspi.h') diff --git a/drivers/spi/cadence_qspi.h b/drivers/spi/cadence_qspi.h index 64c5867609c..b06d7750e2d 100644 --- a/drivers/spi/cadence_qspi.h +++ b/drivers/spi/cadence_qspi.h @@ -26,6 +26,7 @@ struct cadence_spi_plat { u32 trigger_address; fdt_addr_t ahbsize; bool use_dac_mode; + int read_delay; /* Flash parameters */ u32 page_size; -- cgit v1.2.3