1. 23 6月, 2021 3 次提交
  2. 22 6月, 2021 2 次提交
  3. 17 6月, 2021 2 次提交
  4. 15 6月, 2021 2 次提交
  5. 14 6月, 2021 3 次提交
  6. 09 6月, 2021 1 次提交
  7. 07 6月, 2021 1 次提交
  8. 04 6月, 2021 2 次提交
    • P
      spi: stm32-qspi: Fix W=1 build warning · 6829222b
      Patrice Chotard 提交于
      Fix the following compilation warning using W=1 build:
      arm-linux-gnueabi-ld: drivers/spi/spi-stm32-qspi.o: in function `stm32_qspi_poll_status':
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NPatrice Chotard <patrice.chotard@foss.st.com>
      Link: https://lore.kernel.org/r/20210604075009.25914-1-patrice.chotard@foss.st.comSigned-off-by: NMark Brown <broonie@kernel.org>
      6829222b
    • M
      Merge series "MTD: spinand: Add spi_mem_poll_status() support" from <patrice.chotard@foss.st.com> · 627bad89
      Mark Brown 提交于
      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: 6efb943b
      
      --
      2.17.1
      
      _______________________________________________
      linux-arm-kernel mailing list
      linux-arm-kernel@lists.infradead.org
      http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
      627bad89
  9. 03 6月, 2021 5 次提交
  10. 02 6月, 2021 2 次提交
  11. 01 6月, 2021 1 次提交
    • L
      spi: Cleanup on failure of initial setup · 2ec6f20b
      Lukas Wunner 提交于
      Commit c7299fea ("spi: Fix spi device unregister flow") changed the
      SPI core's behavior if the ->setup() hook returns an error upon adding
      an spi_device:  Before, the ->cleanup() hook was invoked to free any
      allocations that were made by ->setup().  With the commit, that's no
      longer the case, so the ->setup() hook is expected to free the
      allocations itself.
      
      I've identified 5 drivers which depend on the old behavior and am fixing
      them up hereinafter: spi-bitbang.c spi-fsl-spi.c spi-omap-uwire.c
      spi-omap2-mcspi.c spi-pxa2xx.c
      
      Importantly, ->setup() is not only invoked on spi_device *addition*:
      It may subsequently be called to *change* SPI parameters.  If changing
      these SPI parameters fails, freeing memory allocations would be wrong.
      That should only be done if the spi_device is finally destroyed.
      I am therefore using a bool "initial_setup" in 4 of the affected drivers
      to differentiate between the invocation on *adding* the spi_device and
      any subsequent invocations: spi-bitbang.c spi-fsl-spi.c spi-omap-uwire.c
      spi-omap2-mcspi.c
      
      In spi-pxa2xx.c, it seems the ->setup() hook can only fail on spi_device
      addition, not any subsequent calls.  It therefore doesn't need the bool.
      
      It's worth noting that 5 other drivers already perform a cleanup if the
      ->setup() hook fails.  Before c7299fea, they caused a double-free
      if ->setup() failed on spi_device addition.  Since the commit, they're
      fine.  These drivers are: spi-mpc512x-psc.c spi-pl022.c spi-s3c64xx.c
      spi-st-ssc4.c spi-tegra114.c
      
      (spi-pxa2xx.c also already performs a cleanup, but only in one of
      several error paths.)
      
      Fixes: c7299fea ("spi: Fix spi device unregister flow")
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Cc: Saravana Kannan <saravanak@google.com>
      Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # pxa2xx
      Link: https://lore.kernel.org/r/f76a0599469f265b69c371538794101fa37b5536.1622149321.git.lukas@wunner.deSigned-off-by: NMark Brown <broonie@kernel.org>
      2ec6f20b
  12. 27 5月, 2021 1 次提交
  13. 24 5月, 2021 3 次提交
  14. 21 5月, 2021 12 次提交