1. 26 1月, 2018 2 次提交
  2. 24 1月, 2018 2 次提交
  3. 18 1月, 2018 4 次提交
  4. 13 1月, 2018 1 次提交
  5. 08 1月, 2018 2 次提交
  6. 05 1月, 2018 1 次提交
  7. 04 1月, 2018 1 次提交
    • G
      spi: sh-msiof: Fix timeout failures for TX-only DMA transfers · 89434c3c
      Geert Uytterhoeven 提交于
      When using RX (with or without TX), the DMA interrupt triggers
      completion when the RX FIFO has been emptied, i.e. after the full
      transfer has finished.
      
      However, when using TX without RX, the DMA interrupt triggers completion
      as soon as the DMA engine has filled the TX FIFO, i.e. before the full
      transfer has finished.  Then sh_msiof_modify_ctr_wait() will spin until
      the transfer has really finished and the TFSE bit is cleared, for at
      most 1 ms.  For slow speeds and/or large transfers, this may cause
      timeouts and transfer failures:
      
          spi_sh_msiof e6e10000.spi: failed to shut down hardware
          74x164 spi2.0: SPI transfer failed: -110
          spi_master spi2: failed to transfer one message from queue
          74x164 spi2.0: Failed writing: -110
      
      Fix this by waiting explicitly until the TX FIFO has been emptied.
      
      Based on a patch in the BSP by Hiromitsu Yamasaki.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      89434c3c
  8. 03 1月, 2018 3 次提交
    • J
      spi: spi-fsl-dspi: account for const type of of_device_id.data · 230c08b2
      Julia Lawall 提交于
      This driver creates a number of const structures that it stores in the
      data field of an of_device_id array.
      
      The data field of an of_device_id structure has type const void *, so
      there is no need for a const-discarding cast when putting const values
      into such a structure.
      
      Done using Coccinelle.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      230c08b2
    • R
      spi: bcm53xx: simplify reading SPI data · 3a410927
      Rafał Miłecki 提交于
      This commit makes transfer function use spi_transfer_is_last to
      determine if currently processed transfer is the last one. Thanks to
      that we finally set hardware registers properly and it makes controller
      behave the way it's expected to.
      
      This allows simplifying read function which can now simply start reading
      from the slot 0 instead of the last saved offset. It has been
      successfully tested using spi_write_then_read.
      
      Moreover this change fixes handling messages with two writing transfers.
      It's important for SPI flash devices as their drivers commonly use one
      transfer for a command and another one for data.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      3a410927
    • J
      spi: sirf: account for const type of of_device_id.data · 9e327ce7
      Julia Lawall 提交于
      This driver creates various const structures that it stores in the
      data field of an of_device_id array.
      
      Adding const to the declaration of the location that receives the
      const value from the data field ensures that the compiler will
      continue to check that the value is not modified.  Furthermore, the
      const-discarding cast on the extraction from the data field is no
      longer needed.
      
      Done using Coccinelle.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      9e327ce7
  9. 23 12月, 2017 1 次提交
  10. 21 12月, 2017 1 次提交
  11. 19 12月, 2017 1 次提交
  12. 14 12月, 2017 4 次提交
  13. 12 12月, 2017 1 次提交
  14. 08 12月, 2017 1 次提交
  15. 07 12月, 2017 2 次提交
  16. 01 12月, 2017 1 次提交
  17. 29 11月, 2017 1 次提交
  18. 28 11月, 2017 1 次提交
  19. 27 11月, 2017 1 次提交
  20. 24 11月, 2017 1 次提交
    • R
      spi: xilinx: Detect stall with Unknown commands · 5a1314fa
      Ricardo Ribalda 提交于
      When the core is configured in C_SPI_MODE > 0, it integrates a
      lookup table that automatically configures the core in dual or quad mode
      based on the command (first byte on the tx fifo).
      
      Unfortunately, that list mode_?_memoy_*.mif does not contain all the
      supported commands by the flash.
      
      Since 4.14 spi-nor automatically tries to probe the flash using SFDP
      (command 0x5a), and that command is not part of the list_mode table.
      
      Whit the right combination of C_SPI_MODE and C_SPI_MEMORY this leads
      into a stall that can only be recovered with a soft rest.
      
      This patch detects this kind of stall and returns -EIO to the caller on
      those commands. spi-nor can handle this error properly:
      
      m25p80 spi0.0: Detected stall. Check C_SPI_MODE and C_SPI_MEMORY. 0x21 0x2404
      m25p80 spi0.0: SPI transfer failed: -5
      spi_master spi0: failed to transfer one message from queue
      m25p80 spi0.0: s25sl064p (8192 Kbytes)
      Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      5a1314fa
  21. 16 11月, 2017 1 次提交
  22. 11 11月, 2017 3 次提交
    • T
      spi: imx: Don't require platform data chipselect array · ffd4db9e
      Trent Piepho 提交于
      If the array is not present, assume all chip selects are native.  This
      is the standard behavior for SPI masters configured via the device
      tree and the behavior of this driver as well when it is configured via
      device tree.
      
      This reduces platform data vs DT differences and allows most of the
      platform data based boards to remove their chip select arrays.
      
      CC: Shawn Guo <shawnguo@kernel.org>
      CC: Sascha Hauer <kernel@pengutronix.de>
      CC: Fabio Estevam <fabio.estevam@nxp.com>
      CC: Mark Brown <broonie@kernel.org>
      Signed-off-by: NTrent Piepho <tpiepho@impinj.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      ffd4db9e
    • T
      spi: imx: Fix failure path leak on GPIO request error · 4e21791e
      Trent Piepho 提交于
      If the code that requests any chip select GPIOs fails, the cleanup of
      spi_bitbang_start() by calling spi_bitbang_stop() is not done.  Add this
      to the failure path.
      
      Note that spi_bitbang_start() has to be called before requesting GPIOs
      because the GPIO data in the spi master is populated when the master is
      registed, and that doesn't happen until spi_bitbang_start() is called.
      
      CC: Shawn Guo <shawnguo@kernel.org>
      CC: Sascha Hauer <kernel@pengutronix.de>
      CC: Fabio Estevam <fabio.estevam@nxp.com>
      CC: Mark Brown <broonie@kernel.org>
      CC: Oleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: NTrent Piepho <tpiepho@impinj.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      4e21791e
    • T
      spi: imx: GPIO based chip selects should not be required · 881a0b99
      Trent Piepho 提交于
      The driver will fail to load if no gpio chip selects are specified,
      this patch changes this so that it no longer fails.
      
      It's possible to use all native chip selects, in which case there is
      no reason to have a gpio chip select array.  This is what happens if
      the *optional* device tree property "cs-gpios" is omitted.
      
      The spi core already checks for the absence of gpio chip selects in
      the master and assigns any slaves the gpio_cs value of -ENOENT.
      
      Also have the driver respect the standard SPI device tree property "num-cs"
      to allow setting the number of chip selects without using cs-gpios.
      
      CC: Mark Brown <broonie@kernel.org>
      CC: Shawn Guo <shawnguo@kernel.org>
      CC: Sascha Hauer <kernel@pengutronix.de>
      CC: Fabio Estevam <fabio.estevam@nxp.com>
      CC: Oleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: NTrent Piepho <tpiepho@impinj.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      881a0b99
  23. 07 11月, 2017 1 次提交
    • T
      spi: imx: Fix failure path leak on GPIO request error correctly · 8197f489
      Trent Piepho 提交于
      In commit 974488e4 ("spi: imx: Fix failure path leak on GPIO request
      error"), spi_bitbang_start() was moved later in the probe sequence.  But
      this doesn't work, as spi_bitbang_start() has to be called before
      requesting GPIOs because the GPIO data in the spi master is populated when
      the master is registed, and that doesn't happen until spi_bitbang_start()
      is called.  The default only works if one uses one CS.
      
      So add a failure path call to spi_bitbang_stop() to fix the leak.
      
      CC: Shawn Guo <shawnguo@kernel.org>
      CC: Sascha Hauer <kernel@pengutronix.de>
      CC: Fabio Estevam <fabio.estevam@nxp.com>
      CC: Mark Brown <broonie@kernel.org>
      CC: Oleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: NTrent Piepho <tpiepho@impinj.com>
      Reviewed-by: NOleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      8197f489
  24. 04 11月, 2017 2 次提交
  25. 03 11月, 2017 1 次提交