Skip to content
Unverified Commit c955a0cc authored by Patrice Chotard's avatar Patrice Chotard Committed by Mark Brown
Browse files

spi: spi-mem: add automatic poll status functions



With STM32 QSPI, it is possible to poll the status register of the device.
This could be done to offload the CPU during an operation (erase or
program a SPI NAND for example).

spi_mem_poll_status API has been added to handle this feature.
This new function take care of the offload/non-offload cases.

For the non-offload case, use read_poll_timeout() to poll the status in
order to release CPU during this phase.
For example, previously, when erasing large area, in non-offload case,
CPU load can reach ~50%, now it decrease to ~35%.

Signed-off-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: default avatarChristophe Kerello <christophe.kerello@foss.st.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/r/20210518162754.15940-2-patrice.chotard@foss.st.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6efb943b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment