1. 05 11月, 2018 1 次提交
  2. 29 8月, 2018 1 次提交
  3. 24 7月, 2018 1 次提交
  4. 17 7月, 2018 1 次提交
    • A
      spi: spi-fsl-dspi: Fill actual_length when doing DMA transfer · 5f8f8035
      Andrey Smirnov 提交于
      Upper layer users of SPI device drivers may rely on 'actual_length',
      so it is important that information is correctly reported. One such
      example is spi_mem_exec_op() function that will fail if
      'actual_length' of the data transferred is not what was requested. Add
      necessary code to populate 'actual_length.
      
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Sanchayan Maity <maitysanchayan@gmail.com>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: cphealy@gmail.com
      Cc: linux-spi@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      5f8f8035
  5. 02 7月, 2018 1 次提交
    • K
      spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe · d8ffee2f
      Krzysztof Kozlowski 提交于
      Registers of DSPI should not be accessed before enabling its clock.  On
      Toradex Colibri VF50 on Iris carrier board this could be seen during
      bootup as imprecise abort:
      
          Unhandled fault: imprecise external abort (0x1c06) at 0x00000000
          Internal error: : 1c06 [#1] ARM
          Modules linked in:
          CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.39-dirty #97
          Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
          Backtrace:
          [<804166a8>] (regmap_write) from [<80466b5c>] (dspi_probe+0x1f0/0x8dc)
          [<8046696c>] (dspi_probe) from [<8040107c>] (platform_drv_probe+0x54/0xb8)
          [<80401028>] (platform_drv_probe) from [<803ff53c>] (driver_probe_device+0x280/0x2f8)
          [<803ff2bc>] (driver_probe_device) from [<803ff674>] (__driver_attach+0xc0/0xc4)
          [<803ff5b4>] (__driver_attach) from [<803fd818>] (bus_for_each_dev+0x70/0xa4)
          [<803fd7a8>] (bus_for_each_dev) from [<803fee74>] (driver_attach+0x24/0x28)
          [<803fee50>] (driver_attach) from [<803fe980>] (bus_add_driver+0x1a0/0x218)
          [<803fe7e0>] (bus_add_driver) from [<803fffe8>] (driver_register+0x80/0x100)
          [<803fff68>] (driver_register) from [<80400fdc>] (__platform_driver_register+0x48/0x50)
          [<80400f94>] (__platform_driver_register) from [<8091cf7c>] (fsl_dspi_driver_init+0x1c/0x20)
          [<8091cf60>] (fsl_dspi_driver_init) from [<8010195c>] (do_one_initcall+0x4c/0x174)
          [<80101910>] (do_one_initcall) from [<80900e8c>] (kernel_init_freeable+0x144/0x1d8)
          [<80900d48>] (kernel_init_freeable) from [<805ff6a8>] (kernel_init+0x10/0x114)
          [<805ff698>] (kernel_init) from [<80107be8>] (ret_from_fork+0x14/0x2c)
      
      Cc: <stable@vger.kernel.org>
      Fixes: 5ee67b58 ("spi: dspi: clear SPI_SR before enable interrupt")
      Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      d8ffee2f
  6. 21 6月, 2018 1 次提交
  7. 20 6月, 2018 12 次提交
  8. 03 1月, 2018 1 次提交
  9. 16 11月, 2017 1 次提交
  10. 03 11月, 2017 1 次提交
  11. 22 5月, 2017 1 次提交
  12. 20 2月, 2017 1 次提交
  13. 23 11月, 2016 3 次提交
  14. 18 11月, 2016 1 次提交
  15. 11 11月, 2016 1 次提交
  16. 30 10月, 2016 1 次提交
  17. 23 8月, 2016 2 次提交
  18. 16 8月, 2016 2 次提交
  19. 06 4月, 2016 1 次提交
  20. 23 3月, 2016 1 次提交
  21. 13 12月, 2015 1 次提交
    • B
      spi-fsl-dspi: Fix CTAR Register access · ef22d160
      Bhuvanchandra DV 提交于
      DSPI instances in Vybrid have a different amount of chip selects
      and CTARs (Clock and transfer Attributes Register). In case of
      DSPI1 we only have 2 CTAR registers and 4 CS. In present driver
      implementation CTAR offset is derived from CS instance which will
      lead to out of bound access if chip select instance is greater than
      CTAR register instance, hence use single CTAR0 register for all CS
      instances. Since we write the CTAR register anyway before each access,
      there is no value in using the additional CTAR registers. Also one
      should not program a value in CTAS for a CTAR register that is not
      present, hence configure CTAS to use CTAR0.
      Signed-off-by: NBhuvanchandra DV <bhuvanchandra.dv@toradex.com>
      Acked-by: NStefan Agner <stefan@agner.ch>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      ef22d160
  22. 18 9月, 2015 1 次提交
  23. 13 6月, 2015 1 次提交
  24. 10 6月, 2015 2 次提交
    • H
      spi: spi-fsl-dspi: Change the way of increasing spi_message->actual_length · c042af95
      Haikun Wang 提交于
      In current driver, we increase actual_length in the following way:
      message->actual_length += dspi_xxx_transfer()
      It has two defects.
      First, transmitting maybe in process when the function call finished and
      we don't know the transmitting result in this moment.
      Secondly, the last sentence in function before returning is accessing the
      SPI register and trigger the data transmitting. If we enable interrupt,
      interrupt may be generated before function return and we also have the same
      sentence "message->actual_length += dspi_xxx_transfer()"
      in the IRQ handler.
      And usually dspi_xxx_transfer will trigger a new IRQ.
      The original dspi_xxx_transfer call may return when no new IRQ generate.
      This may mess the variable spi_message->actual_length.
      Now we increase the variable in the IRQ handler and only when we get the
      TCF or EOQ interrupt
      And we get the transmitted data length from the SPI transfer counter
      instead of the function return value.
      Signed-off-by: NHaikun Wang <haikun.wang@freescale.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      c042af95
    • H
      spi: spi-fsl-dspi: Enable TCF interrupt mode support · d1f4a38c
      Haikun Wang 提交于
      DSPI module has two optional interrupts when complete data transfer.
      One is EOQ interrupt, the other one is TCF interrupt.
      EOQ indicates a queue of data frame has been transmitted.
      TCF indicates a frame has been transmitted.
      This patch enable support TCF mode.
      Driver binds a correct interrupt mode to every compatible string.
      User should use the correct compatible string in the dts node.
      Signed-off-by: NHaikun Wang <haikun.wang@freescale.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      d1f4a38c