1. 19 3月, 2021 1 次提交
  2. 12 3月, 2021 2 次提交
  3. 06 2月, 2021 8 次提交
  4. 13 1月, 2021 1 次提交
  5. 05 1月, 2021 1 次提交
  6. 22 12月, 2020 1 次提交
  7. 06 11月, 2020 1 次提交
  8. 02 10月, 2020 1 次提交
  9. 09 9月, 2020 2 次提交
  10. 07 9月, 2020 1 次提交
    • M
      spi: stm32: Rate-limit the 'Communication suspended' message · ea8be08c
      Marek Vasut 提交于
      The 'spi_stm32 44004000.spi: Communication suspended' message means that
      when using PIO, the kernel did not read the FIFO fast enough and so the
      SPI controller paused the transfer. Currently, this is printed on every
      single such event, so if the kernel is busy and the controller is pausing
      the transfers often, the kernel will be all the more busy scrolling this
      message into the log buffer every few milliseconds. That is not helpful.
      
      Instead, rate-limit the message and print it every once in a while. It is
      not possible to use the default dev_warn_ratelimited(), because that is
      still too verbose, as it prints 10 lines (DEFAULT_RATELIMIT_BURST) every
      5 seconds (DEFAULT_RATELIMIT_INTERVAL). The policy here is to print 1 line
      every 50 seconds (DEFAULT_RATELIMIT_INTERVAL * 10), because 1 line is more
      than enough and the cycles saved on printing are better left to the CPU to
      handle the SPI. However, dev_warn_once() is also not useful, as the user
      should be aware that this condition is possibly recurring or ongoing. Thus
      the custom rate-limit policy.
      
      Finally, turn the message from dev_warn() to dev_dbg(), since the system
      does not suffer any sort of malfunction if this message appears, it is
      just slowing down. This further reduces the printing into the log buffer
      and frees the CPU to do useful work.
      
      Fixes: dcbe0d84 ("spi: add driver for STM32 SPI controller")
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Cc: Amelie Delaunay <amelie.delaunay@st.com>
      Cc: Antonio Borneo <borneo.antonio@gmail.com>
      Cc: Mark Brown <broonie@kernel.org>
      Link: https://lore.kernel.org/r/20200905151913.117775-1-marex@denx.deSigned-off-by: NMark Brown <broonie@kernel.org>
      ea8be08c
  11. 11 8月, 2020 5 次提交
  12. 05 8月, 2020 1 次提交
  13. 25 5月, 2020 1 次提交
    • D
      spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4 · 61367d0b
      dillon min 提交于
      in l3gd20 driver startup, there is a setup failed error return from
      stm32 spi driver
      
           "
           [    2.687630] st-gyro-spi spi0.0: supply vdd not found, using dummy
           regulator
           [    2.696869] st-gyro-spi spi0.0: supply vddio not found, using dummy
           regulator
           [    2.706707] spi_stm32 40015000.spi: SPI transfer setup failed
           [    2.713741] st-gyro-spi spi0.0: SPI transfer failed: -22
           [    2.721096] spi_master spi0: failed to transfer one message from queue
           [    2.729268] iio iio:device0: failed to read Who-Am-I register.
           [    2.737504] st-gyro-spi: probe of spi0.0 failed with error -22
           "
      
      after debug into spi-stm32 driver, st-gyro-spi split two steps to read
      l3gd20 id
      
      first: send command to l3gd20 with read id command in tx_buf, rx_buf
      is null.
      second: read id with tx_buf is null, rx_buf not null.
      
      so, for second step, stm32 driver recongise this process as 'SPI_SIMPLE_RX'
      from stm32_spi_communication_type(), but there is no related process for this
      type in stm32f4_spi_set_mode(), then we get error from
      stm32_spi_transfer_one_setup().
      
      we can use two method to fix this bug.
      1, use stm32 spi's "In unidirectional receive-only mode (BIDIMODE=0 and
      RXONLY=1)". but as our code running in sdram, the read latency is too large
      to get so many receive overrun error in interrupts handler.
      
      2, use stm32 spi's "In full-duplex (BIDIMODE=0 and RXONLY=0)", as tx_buf is
      null, so add flag 'SPI_MASTER_MUST_TX' to spi master.
      
      Change since V4:
      1 remove dummy data sent out by stm32 spi driver
      2 add flag 'SPI_MASTER_MUST_TX' to spi master
      Signed-off-by: Ndillon min <dillon.minfei@gmail.com>
      Link: https://lore.kernel.org/r/1590378348-8115-8-git-send-email-dillon.minfei@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
      61367d0b
  14. 21 3月, 2020 1 次提交
  15. 16 12月, 2019 1 次提交
  16. 10 12月, 2019 1 次提交
  17. 02 5月, 2019 1 次提交
  18. 08 1月, 2019 10 次提交