drivers: spi: Fix data loss issue in QSPI
authorNaresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Fri, 7 Mar 2025 09:38:26 +0000 (01:38 -0800)
committerTom Rini <trini@konsulko.com>
Tue, 29 Apr 2025 21:28:54 +0000 (15:28 -0600)
commitc0ed43c2a934dadc4066e3a1e62e4db43b2fbc20
treecafc86d13c02f3069315a1fa22c56ffc22d713a0
parent93f4888d71a40486edab664a9bf8390188c78c99
drivers: spi: Fix data loss issue in QSPI

QSPI driver performs chip select operation before every read/write
access. During this operation, driver needs to enable and disable
the QSPI controller. This may cause data loss if there is inadvertent
halting of any ongoing read/write operation. To avoid this scenario,
waiting for the QSPI status to be idle before next read/write
operation is implemented.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
drivers/spi/cadence_qspi_apb.c