mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
627bad89ce
Patrice Chotard <patrice.chotard@foss.st.com>:
From: Patrice Chotard <patrice.chotard@foss.st.com>
This series adds support for the spi_mem_poll_status() spinand
interface.
Some QSPI controllers allows to poll automatically memory
status during operations (erase, read or write). This allows to
offload the CPU for this task.
STM32 QSPI is supporting this feature, driver update are also
part of this series.
Changes in v5:
- Update spi_mem_read_status() description.
- Update poll_status() description API by indicating that data buffer is
filled with last status value.
- Update timeout parameter by timeout_ms in spi_mem_poll_status() prototype.
- Remove parenthesys arount -EINVAL in spi_mem_poll_status().
- Add missing spi_mem_supports_op() call in stm32_qspi_poll_status().
- Add Boris Reviewed-by for patch 1 and 2.
Changes in v4:
- Remove init_completion() from spi_mem_probe() added in v2.
- Add missing static for spi_mem_read_status().
- Check if operation in spi_mem_poll_status() is a READ.
- Update patch 2 commit message.
- Add comment which explains how delays has been calculated.
- Rename SPINAND_STATUS_TIMEOUT_MS to SPINAND_WAITRDY_TIMEOUT_MS.
Chnages in v3:
- Add spi_mem_read_status() which allows to read 8 or 16 bits status.
- Add initial_delay_us and polling_delay_us parameters to spi_mem_poll_status().
and also to poll_status() callback.
- Move spi_mem_supports_op() in SW-based polling case.
- Add delay before invoquing read_poll_timeout().
- Remove the reinit/wait_for_completion() added in v2.
- Add initial_delay_us and polling_delay_us parameters to spinand_wait().
- Add SPINAND_READ/WRITE/ERASE/RESET_INITIAL_DELAY_US and
SPINAND_READ/WRITE/ERASE/RESET_POLL_DELAY_US defines.
- Remove spi_mem_finalize_op() API added in v2.
Changes in v2:
- Indicates the spi_mem_poll_status() timeout unit
- Use 2-byte wide status register
- Add spi_mem_supports_op() call in spi_mem_poll_status()
- Add completion management in spi_mem_poll_status()
- Add offload/non-offload case management in spi_mem_poll_status()
- Optimize the non-offload case by using read_poll_timeout()
- mask and match stm32_qspi_poll_status()'s parameters are 2-byte wide
- Make usage of new spi_mem_finalize_op() API in
stm32_qspi_wait_poll_status()
Patrice Chotard (3):
spi: spi-mem: add automatic poll status functions
mtd: spinand: use the spi-mem poll status APIs
spi: stm32-qspi: add automatic poll status feature
drivers/mtd/nand/spi/core.c | 45 +++++++++++++------
drivers/spi/spi-mem.c | 86 ++++++++++++++++++++++++++++++++++++
drivers/spi/spi-stm32-qspi.c | 86 ++++++++++++++++++++++++++++++++----
include/linux/mtd/spinand.h | 22 +++++++++
include/linux/spi/spi-mem.h | 16 +++++++
5 files changed, 234 insertions(+), 21 deletions(-)
base-commit:
|
||
---|---|---|
.. | ||
atmel-quadspi.c | ||
internals.h | ||
Kconfig | ||
Makefile | ||
spi-altera-core.c | ||
spi-altera-dfl.c | ||
spi-altera-platform.c | ||
spi-amd.c | ||
spi-ar934x.c | ||
spi-armada-3700.c | ||
spi-at91-usart.c | ||
spi-ath79.c | ||
spi-atmel.c | ||
spi-au1550.c | ||
spi-axi-spi-engine.c | ||
spi-bcm63xx-hsspi.c | ||
spi-bcm63xx.c | ||
spi-bcm2835.c | ||
spi-bcm2835aux.c | ||
spi-bcm-qspi.c | ||
spi-bcm-qspi.h | ||
spi-bitbang-txrx.h | ||
spi-bitbang.c | ||
spi-brcmstb-qspi.c | ||
spi-butterfly.c | ||
spi-cadence-quadspi.c | ||
spi-cadence.c | ||
spi-cavium-octeon.c | ||
spi-cavium-thunderx.c | ||
spi-cavium.c | ||
spi-cavium.h | ||
spi-clps711x.c | ||
spi-coldfire-qspi.c | ||
spi-davinci.c | ||
spi-dln2.c | ||
spi-dw-bt1.c | ||
spi-dw-core.c | ||
spi-dw-dma.c | ||
spi-dw-mmio.c | ||
spi-dw-pci.c | ||
spi-dw.h | ||
spi-ep93xx.c | ||
spi-falcon.c | ||
spi-fsi.c | ||
spi-fsl-cpm.c | ||
spi-fsl-cpm.h | ||
spi-fsl-dspi.c | ||
spi-fsl-espi.c | ||
spi-fsl-lib.c | ||
spi-fsl-lib.h | ||
spi-fsl-lpspi.c | ||
spi-fsl-qspi.c | ||
spi-fsl-spi.c | ||
spi-fsl-spi.h | ||
spi-geni-qcom.c | ||
spi-gpio.c | ||
spi-hisi-kunpeng.c | ||
spi-hisi-sfc-v3xx.c | ||
spi-img-spfi.c | ||
spi-imx.c | ||
spi-iproc-qspi.c | ||
spi-jcore.c | ||
spi-lantiq-ssc.c | ||
spi-lm70llp.c | ||
spi-loopback-test.c | ||
spi-lp8841-rtc.c | ||
spi-mem.c | ||
spi-meson-spicc.c | ||
spi-meson-spifc.c | ||
spi-mpc52xx-psc.c | ||
spi-mpc52xx.c | ||
spi-mpc512x-psc.c | ||
spi-mt65xx.c | ||
spi-mt7621.c | ||
spi-mtk-nor.c | ||
spi-mux.c | ||
spi-mxic.c | ||
spi-mxs.c | ||
spi-npcm-fiu.c | ||
spi-npcm-pspi.c | ||
spi-nxp-fspi.c | ||
spi-oc-tiny.c | ||
spi-omap2-mcspi.c | ||
spi-omap-100k.c | ||
spi-omap-uwire.c | ||
spi-orion.c | ||
spi-pic32-sqi.c | ||
spi-pic32.c | ||
spi-pl022.c | ||
spi-ppc4xx.c | ||
spi-pxa2xx-dma.c | ||
spi-pxa2xx-pci.c | ||
spi-pxa2xx.c | ||
spi-pxa2xx.h | ||
spi-qcom-qspi.c | ||
spi-qup.c | ||
spi-rb4xx.c | ||
spi-realtek-rtl.c | ||
spi-rockchip.c | ||
spi-rpc-if.c | ||
spi-rspi.c | ||
spi-s3c24xx-regs.h | ||
spi-s3c24xx.c | ||
spi-s3c64xx.c | ||
spi-sc18is602.c | ||
spi-sh-hspi.c | ||
spi-sh-msiof.c | ||
spi-sh-sci.c | ||
spi-sh.c | ||
spi-sifive.c | ||
spi-slave-mt27xx.c | ||
spi-slave-system-control.c | ||
spi-slave-time.c | ||
spi-sprd-adi.c | ||
spi-sprd.c | ||
spi-st-ssc4.c | ||
spi-stm32-qspi.c | ||
spi-stm32.c | ||
spi-sun4i.c | ||
spi-sun6i.c | ||
spi-synquacer.c | ||
spi-tegra20-sflash.c | ||
spi-tegra20-slink.c | ||
spi-tegra114.c | ||
spi-tegra210-quad.c | ||
spi-test.h | ||
spi-ti-qspi.c | ||
spi-tle62x0.c | ||
spi-topcliff-pch.c | ||
spi-uniphier.c | ||
spi-xcomm.c | ||
spi-xilinx.c | ||
spi-xlp.c | ||
spi-xtensa-xtfpga.c | ||
spi-zynq-qspi.c | ||
spi-zynqmp-gqspi.c | ||
spi.c | ||
spidev.c |