1. 12 Oct, 2018 4 commits
    • Robin Gong's avatar
      spi: imx: correct wml as the last sg length · 5ba5a373
      Robin Gong authored
      Correct wml as the last rx sg length instead of the whole transfer
      length. Otherwise, mtd_stresstest will be failed as below:
      
      insmod mtd_stresstest.ko dev=0
      =================================================
      mtd_stresstest: MTD device: 0
      mtd_stresstest: not NAND flash, assume page size is 512 bytes.
      mtd_stresstest: MTD device size 4194304, eraseblock size 65536, page size 512, count of eraseblocks 64, pa0
      mtd_stresstest: doing operations
      mtd_stresstest: 0 operations done
      mtd_test: mtd_read from 1ff532, size 880
      mtd_test: mtd_read from 20c267, size 64998
      spi_master spi0: I/O Error in DMA RX
      m25p80 spi0.0: SPI transfer failed: -110
      spi_master spi0: failed to transfer one message from queue
      mtd_test: error: read failed at 0x20c267
      mtd_stresstest: error -110 occurred
      =================================================
      insmod: ERROR: could not insert module mtd_stresstest.ko: Connection timed out
      Signed-off-by: default avatarRobin Gong <yibin.gong@nxp.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      5ba5a373
    • Robin Gong's avatar
      spi: imx: move wml setting to later than setup_transfer · 987a2dfe
      Robin Gong authored
      Current dynamic burst length is based on the whole transfer length,
      that's ok if there is only one sg, but is not right in case multi sgs
      in one transfer,because the tail data should be based on the last sg
      length instead of the whole transfer length. Move wml setting for DMA
      to the later place, thus, the next patch could get the right last sg
      length for wml setting. This patch is a preparation one, no any
      function change involved.
      Signed-off-by: default avatarRobin Gong <yibin.gong@nxp.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      987a2dfe
    • Lubomir Rintel's avatar
      PCI: Provide pci_match_id() with CONFIG_PCI=n · 9c212009
      Lubomir Rintel authored
      This spares drivers from #ifdef-ing on CONFIG_PCI if the driver can be
      optionally built on machines without PCI bus.
      
      Consistent with acpi_driver_match_device() and similar.
      Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      9c212009
    • Phil Elwell's avatar
      spi: Make GPIO CSs honour the SPI_NO_CS flag · 25972d0c
      Phil Elwell authored
      The SPI configuration state includes an SPI_NO_CS flag that disables
      all CS line manipulation, for applications that want to manage their
      own chip selects. However, this flag is ignored by the GPIO CS code
      in the SPI framework.
      
      Correct this omission with a trivial patch.
      Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      25972d0c
  2. 11 Oct, 2018 16 commits
  3. 10 Oct, 2018 4 commits
  4. 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
  5. 04 Oct, 2018 1 commit
  6. 03 Oct, 2018 1 commit
  7. 01 Oct, 2018 2 commits
  8. 28 Sep, 2018 2 commits
  9. 27 Sep, 2018 4 commits
  10. 24 Sep, 2018 3 commits
  11. 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