diff options
author | Patrice Chotard <patrice.chotard@foss.st.com> | 2021-05-18 18:27:52 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-03 14:04:56 +0100 |
commit | c955a0cc8a286e5da1ebb88c19201e9bab8c2422 (patch) | |
tree | 0ee6eae99184df1a2b4e992b02c2aeb39cc486a0 /drivers/mtd | |
parent | 6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff) |
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: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/r/20210518162754.15940-2-patrice.chotard@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/mtd')
0 files changed, 0 insertions, 0 deletions