1. 11 Oct, 2018 3 commits
    • Talel Shenhar's avatar
      dw: spi: add support for Amazon's Alpine spi controller · f2d70479
      Talel Shenhar authored
      Add support for a new devicetree compatible string called
      'amazon,alpine-apb-ssi', which is necessary for the Amazon Alpine spi
      controller. 'amazon,alpine-dw-apb-ssi' is used in the dw spi driver if
      specified in the devicetree.  Otherwise, fall back to driver default
      behavior, i.e. original dw IP hw driver behavior.
      Signed-off-by: default avatarTalel Shenhar <talel@amazon.com>
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      f2d70479
    • Talel Shenhar's avatar
      spi: dw: add compatible for Amazon's Alpine spi controller · d49a3036
      Talel Shenhar authored
      This compatible adds the ability for dw spi controller driver to work with
      the dw spi controller found on Alpine chips.
      
      The dw spi controller has an auto-deselect of Chip-Select, in case there is
      no data inside the Tx FIFO. While working on platforms with Alpine chips,
      auto-deselect mode causes an issue for some spi devices that can't handle
      the Chip-Select deselect in the middle of a transaction. It is a normal
      behavior for a Tx FIFO to be empty in the middle of a transaction, due to
      busy cpu. In the Alpine chip family an option to change the default
      behavior was added to the original dw spi controller to prevent this issue
      of de-asserting Chip-Select once TX FIFO is empty. The change was to allow
      SW manual control of the Chip-Select. With this change, as long as the
      Slave Enable Register is asserted, the Chip-Select will be asserted. As a
      result, it is necessary to deselect the Slave Select Register once the
      transaction is done. This feature is enabled via a new device compatible
      string called 'amazon,alpine-dw-apb-ssi'.  Once the driver identifies the
      new compatible string, it enables the hw fixup logic, by writing to a
      dedicated register found in the IP reserved area and will start manual
      deselecting the Slave Select Register when the transfer ends.
      Signed-off-by: default avatarTalel Shenhar <talel@amazon.com>
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      d49a3036
    • Mark Brown's avatar
      Merge tag 'qcom-geni-immutable-for-mark-brown' of... · 93043b67
      Mark Brown authored
      Merge tag 'qcom-geni-immutable-for-mark-brown' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into spi-4.20
      
      Immutable branch for QCOM Geni patches
      93043b67
  2. 10 Oct, 2018 4 commits
  3. 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
  4. 04 Oct, 2018 1 commit
  5. 03 Oct, 2018 1 commit
  6. 01 Oct, 2018 2 commits
  7. 28 Sep, 2018 2 commits
  8. 27 Sep, 2018 4 commits
  9. 24 Sep, 2018 3 commits
  10. 21 Sep, 2018 1 commit
    • Nathan Chancellor's avatar
      spi: pic32: Use proper enum in dmaengine_prep_slave_rg · 8cfde784
      Nathan Chancellor authored
      Clang warns when one enumerated type is converted implicitly to another:
      
      drivers/spi/spi-pic32.c:323:8: warning: implicit conversion from
      enumeration type 'enum dma_data_direction' to different enumeration type
      'enum dma_transfer_direction' [-Wenum-conversion]
                                                DMA_FROM_DEVICE,
                                                ^~~~~~~~~~~~~~~
      drivers/spi/spi-pic32.c:333:8: warning: implicit conversion from
      enumeration type 'enum dma_data_direction' to different enumeration type
      'enum dma_transfer_direction' [-Wenum-conversion]
                                                DMA_TO_DEVICE,
                                                ^~~~~~~~~~~~~
      2 warnings generated.
      
      Use the proper enums from dma_transfer_direction (DMA_FROM_DEVICE =
      DMA_DEV_TO_MEM = 2, DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1) to satify Clang.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/159Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      8cfde784
  11. 20 Sep, 2018 1 commit
  12. 18 Sep, 2018 4 commits
  13. 17 Sep, 2018 6 commits
  14. 13 Sep, 2018 1 commit
  15. 11 Sep, 2018 1 commit
    • Linus Walleij's avatar
      spi: davinci: Remove chip select GPIO pdata · 56df612a
      Linus Walleij authored
      The DaVinci SPI can use either:
      - Internal chip selects (inside the SPI host)
      - External chip selects (using GPIO)
      - External chip selects passed in pdata
      
      The last way of passing external chip selects through
      platform data is not used in the kernel. Delete it to make
      the code simpler when refactoring GPIO.
      
      Cc: Sekhar Nori <nsekhar@ti.com>
      Cc: Kevin Hilman <khilman@kernel.org>
      Cc: Michele Dionisio <michele.dionisio@gmail.com>
      Cc: Frode Isaksen <fisaksen@baylibre.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      56df612a
  16. 10 Sep, 2018 2 commits
  17. 07 Sep, 2018 2 commits