1. 21 Oct, 2018 1 commit
  2. 19 Oct, 2018 5 commits
    • Vignesh R's avatar
      spi: omap2-mcspi: Add slave mode support · 89e8b9cb
      Vignesh R authored
      Add support to use McSPI controller as SPI slave. In slave mode, DMA TX
      completion does not mean entire data has been shifted out as data might
      still be stuck in FIFO waiting for master to clock the bus. Therefore,
      add an IRQ handler for slave mode to know when entire data in FIFO has
      been shifted out.
      Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      89e8b9cb
    • Vignesh R's avatar
      spi: omap2-mcspi: Set FIFO DMA trigger level to word length · b682cffa
      Vignesh R authored
      McSPI has 32 byte FIFO in Transmit-Receive mode. Current code tries to
      configuration FIFO watermark level for DMA trigger to be GCD of transfer
      length and max FIFO size which would mean trigger level may be set to 32
      for transmit-receive mode if length is aligned. This does not work in
      case of SPI slave mode where FIFO always needs to have data ready
      whenever master starts the clock. With DMA trigger size of 32 there will
      be a small window during slave TX where DMA is still putting data into
      FIFO but master would have started clock for next byte, resulting in
      shifting out of stale data. Similarly, on Slave RX side there may be RX
      FIFO overflow
      Fix this by setting FIFO watermark for DMA trigger to word
      length. This means DMA is triggered as soon as FIFO has space for word
      length bytes and DMA would make sure FIFO is almost always full
      therefore improving FIFO occupancy in both master and slave mode.
      Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      b682cffa
    • Vignesh R's avatar
      spi: omap2-mcspi: Switch to readl_poll_timeout() · 13d515c7
      Vignesh R authored
      Use standard readl_poll_timeout() macro for polling on status bits.
      Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      13d515c7
    • Ludovic Barre's avatar
      spi: spi-mem: add stm32 qspi controller · c530cd1d
      Ludovic Barre authored
      The qspi controller is a specialized communication interface
      targeting single, dual or quad SPI Flash memories (NOR/NAND).
      
      It can operate in any of the following modes:
      -indirect mode: all the operations are performed using the quadspi
       registers
      -read memory-mapped mode: the external Flash memory is mapped to the
       microcontroller address space and is seen by the system as if it was
       an internal memory
      
      tested on:
      -NOR: mx66l51235l
      -NAND: MT29F2G01ABAGD
      Signed-off-by: default avatarLudovic Barre <ludovic.barre@st.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      c530cd1d
    • Ludovic Barre's avatar
      dt-bindings: spi: add stm32 qspi controller · c3e6845e
      Ludovic Barre authored
      This patch adds the documentation of device tree bindings
      for the STM32 QSPI controller. It is a specialized communication
      interface targeting single, dual or quad SPI Flash memories (NOR/NAND).
      Signed-off-by: default avatarLudovic Barre <ludovic.barre@st.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      c3e6845e
  3. 17 Oct, 2018 2 commits
  4. 12 Oct, 2018 5 commits
  5. 11 Oct, 2018 16 commits
  6. 10 Oct, 2018 4 commits
  7. 08 Oct, 2018 2 commits
    • Nathan Chancellor's avatar
      spi: spi-ep93xx: Use dma_data_direction for ep93xx_spi_dma_{finish,prepare} · a1108c7b
      Nathan Chancellor authored
      Clang warns when one enumerated type is implicitly converted to another.
      
      drivers/spi/spi-ep93xx.c:342:62: warning: implicit conversion from
      enumeration type 'enum dma_transfer_direction' to different enumeration
      type 'enum dma_data_direction' [-Wenum-conversion]
              nents = dma_map_sg(chan->device->dev, sgt->sgl, sgt->nents, dir);
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      ./include/linux/dma-mapping.h:428:58: note: expanded from macro
      'dma_map_sg'
      #define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, 0)
                                     ~~~~~~~~~~~~~~~~          ^
      drivers/spi/spi-ep93xx.c:348:57: warning: implicit conversion from
      enumeration type 'enum dma_transfer_direction' to different enumeration
      type 'enum dma_data_direction' [-Wenum-conversion]
                      dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir);
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      ./include/linux/dma-mapping.h:429:62: note: expanded from macro
      'dma_unmap_sg'
      #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, 0)
                                       ~~~~~~~~~~~~~~~~~~          ^
      drivers/spi/spi-ep93xx.c:377:56: warning: implicit conversion from
      enumeration type 'enum dma_transfer_direction' to different enumeration
      type 'enum dma_data_direction' [-Wenum-conversion]
              dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir);
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      ./include/linux/dma-mapping.h:429:62: note: expanded from macro
      'dma_unmap_sg'
      #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, 0)
                                       ~~~~~~~~~~~~~~~~~~          ^
      3 warnings generated.
      
      dma_{,un}map_sg expect an enum of type dma_data_direction but this
      driver uses dma_transfer_direction for everything. Convert the driver to
      use dma_data_direction for these two functions.
      
      There are two places that strictly require an enum of type
      dma_transfer_direction: the direction member in struct dma_slave_config
      and the direction parameter in dmaengine_prep_slave_sg. To avoid using
      an explicit cast, add a simple function, ep93xx_dma_data_to_trans_dir,
      to safely map between the two types because they are not 1 to 1 in
      meaning.
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      a1108c7b
    • Lukasz Majewski's avatar
      spidev: Enable the Liebherr's BK4 board to work with spidev driver · 5e9feb35
      Lukasz Majewski authored
      With this commit the DSPI driver on the BK4 board can be used for SPI
      transmission managed from user space (via /dev/spidev0.0).
      
      Example usage/testing:
      insmod ./spi-fsl-dspi.ko
      ./spidev_test -D /dev/spidev0.0 -s 3000000 -v -H -b 8 -p "\xCC\x11\x22\x74"
      Signed-off-by: default avatarLukasz Majewski <lukma@denx.de>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      5e9feb35
  8. 04 Oct, 2018 1 commit
  9. 03 Oct, 2018 1 commit
  10. 01 Oct, 2018 2 commits
  11. 28 Sep, 2018 1 commit