1. 11 7月, 2018 1 次提交
  2. 20 6月, 2018 1 次提交
  3. 19 6月, 2018 1 次提交
    • J
      spi: orion: fix CS GPIO handling again · fb9acf5f
      Jan Kundrát 提交于
      The code did not de-assert any CS GPIOs before probing slaves. This
      means that several CS signals could be active at once, garbling the
      communication. Whether this was actually a problem depended on the type
      of the SPI device attached (so my "spidev" for userspace access worked
      correctly because its probe was effectively a no-op), and on the state
      of the GPIO pins at SoC's boot.
      
      The code was already iterating through all DT children of the SPI
      controller, so this change re-uses that loop for CS GPIO setup as well.
      This means that this might change the number of the HW CS signal which
      is picked for all GPIO CS devices. Previously, the lowest one was used,
      but we now use the first one from the DT.
      
      With this move of the code, we can also finally initialize each GPIO CS
      lane before registering the SPI controller (which in turn probes for
      slaves).
      
      I tried to fix this in 54424862 already, but that only did it half
      way by registering the GPIOs properly. That patch failed to set their
      logic signals early enough, though.
      Signed-off-by: NJan Kundrát <jan.kundrat@cesnet.cz>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      fb9acf5f
  4. 18 6月, 2018 2 次提交
    • J
      spi: cadence: Change usleep_range() to udelay(), for atomic context · 931c4e9a
      Janek Kotas 提交于
      The path "spi: cadence: Add usleep_range() for
      cdns_spi_fill_tx_fifo()" added a usleep_range() function call,
      which cannot be used in atomic context.
      However the cdns_spi_fill_tx_fifo() function can be called during
      an interrupt which may result in a kernel panic:
      
      BUG: scheduling while atomic: grep/561/0x00010002
      Modules linked in:
      Preemption disabled at:
      [<ffffff800858ea28>] wait_for_common+0x48/0x178
      CPU: 0 PID: 561 Comm: grep Not tainted 4.17.0 #1
      Hardware name: Cadence CSP (DT)
      Call trace:
       dump_backtrace+0x0/0x198
       show_stack+0x14/0x20
       dump_stack+0x8c/0xac
       __schedule_bug+0x6c/0xb8
       __schedule+0x570/0x5d8
       schedule+0x34/0x98
       schedule_hrtimeout_range_clock+0x98/0x110
       schedule_hrtimeout_range+0x10/0x18
       usleep_range+0x64/0x98
       cdns_spi_fill_tx_fifo+0x70/0xb0
       cdns_spi_irq+0xd0/0xe0
       __handle_irq_event_percpu+0x9c/0x128
       handle_irq_event_percpu+0x34/0x88
       handle_irq_event+0x48/0x78
       handle_fasteoi_irq+0xbc/0x1b0
       generic_handle_irq+0x24/0x38
       __handle_domain_irq+0x84/0xf8
       gic_handle_irq+0xc4/0x180
      
      This patch replaces the function call with udelay() which can be
      used in an atomic context, like an interrupt.
      Signed-off-by: NJan Kotas <jank@cadence.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      931c4e9a
    • G
      spi: sh-msiof: Make sure all DMA operations have completed · 08ba7ae3
      Geert Uytterhoeven 提交于
      In case of a bi-directional transfer, receive DMA may complete in the
      rcar-dmac driver before transmit DMA, due to scheduling latencies.
      As the MSIOF driver waits for completion of the receive DMA only, it may
      submit the next transmit DMA request before the previous one has
      completed.
      
      Make the driver more robust by waiting for the completion of both
      receive and transmit DMA, when applicable.
      
      Based on a patch in the BSP by Ryo Kataoka.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      08ba7ae3
  5. 04 6月, 2018 1 次提交
  6. 31 5月, 2018 1 次提交
  7. 24 5月, 2018 1 次提交
  8. 22 5月, 2018 1 次提交
  9. 21 5月, 2018 2 次提交
  10. 17 5月, 2018 2 次提交
  11. 13 5月, 2018 1 次提交
  12. 11 5月, 2018 6 次提交
  13. 10 5月, 2018 1 次提交
  14. 09 5月, 2018 1 次提交
    • R
      spi: remove the older/duplicated bcm53xx driver · 331bbcfc
      Rafał Miłecki 提交于
      This driver was added by commit 0fc6a323 ("spi: bcm53xx: driver for
      SPI controller on Broadcom bcma SoC") back in 2014. It was needed to
      provide a minimal support for SPI controller on BCM5301X (AKA Northstar)
      devices.
      
      An alternative driver was added by Kamal in commit fa236a7e ("spi:
      bcm-qspi: Add Broadcom MSPI driver") 2 years later. It supports the same
      hardware but for some reason a new driver has been developed for it.
      
      At this point the new driver supports: more modes, setting a speed,
      setting bits per word and uses IRQs instead of polling. DTS file for
      BCM5301X has also been updated in the commit 1c8f4065 ("ARM: dts:
      BCM5301X: convert to iProc QSPI") - over a year ago.
      
      That explained I see no reason to keep the old driver alive.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      331bbcfc
  15. 04 5月, 2018 2 次提交
    • T
      spi: pxa2xx: check clk_prepare_enable() return value · 62bbc864
      Tobias Jordan 提交于
      clk_prepare_enable() can fail, so its return value should be checked and
      acted upon.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      
      Fixes: 3343b7a6 ("spi/pxa2xx: convert to the common clk framework")
      Signed-off-by: NTobias Jordan <Tobias.Jordan@elektrobit.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      62bbc864
    • R
      spi: bcm2835aux: ensure interrupts are enabled for shared handler · bc519d95
      Rob Herring 提交于
      The BCM2835 AUX SPI has a shared interrupt line (with AUX UART).
      Downstream fixes this with an AUX irqchip to demux the IRQ sources and a
      DT change which breaks compatibility with older kernels. The AUX irqchip
      was already rejected for upstream[1] and the DT change would break
      working systems if the DTB is updated to a newer one. The latter issue
      was brought to my attention by Alex Graf.
      
      The root cause however is a bug in the shared handler. Shared handlers
      must check that interrupts are actually enabled before servicing the
      interrupt. Add a check that the TXEMPTY or IDLE interrupts are enabled.
      
      [1] https://patchwork.kernel.org/patch/9781221/
      
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Stefan Wahren <stefan.wahren@i2se.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Ray Jui <rjui@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: linux-spi@vger.kernel.org
      Cc: linux-rpi-kernel@lists.infradead.org
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NRob Herring <robh@kernel.org>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      bc519d95
  16. 03 5月, 2018 3 次提交
  17. 02 5月, 2018 5 次提交
  18. 27 4月, 2018 1 次提交
  19. 26 4月, 2018 2 次提交
  20. 25 4月, 2018 1 次提交
  21. 24 4月, 2018 1 次提交
  22. 23 4月, 2018 2 次提交
  23. 21 4月, 2018 1 次提交