1. 27 7月, 2020 2 次提交
  2. 18 7月, 2020 1 次提交
  3. 17 6月, 2020 1 次提交
  4. 27 4月, 2020 1 次提交
  5. 16 4月, 2020 1 次提交
  6. 11 3月, 2020 2 次提交
  7. 02 3月, 2020 4 次提交
  8. 24 1月, 2020 2 次提交
  9. 21 1月, 2020 5 次提交
  10. 24 12月, 2019 2 次提交
  11. 11 12月, 2019 1 次提交
    • L
      dmaengine: Fix access to uninitialized dma_slave_caps · 53a256a9
      Lukas Wunner 提交于
      dmaengine_desc_set_reuse() allocates a struct dma_slave_caps on the
      stack, populates it using dma_get_slave_caps() and then accesses one
      of its members.
      
      However dma_get_slave_caps() may fail and this isn't accounted for,
      leading to a legitimate warning of gcc-4.9 (but not newer versions):
      
         In file included from drivers/spi/spi-bcm2835.c:19:0:
         drivers/spi/spi-bcm2835.c: In function 'dmaengine_desc_set_reuse':
      >> include/linux/dmaengine.h:1370:10: warning: 'caps.descriptor_reuse' is used uninitialized in this function [-Wuninitialized]
           if (caps.descriptor_reuse) {
      
      Fix it, thereby also silencing the gcc-4.9 warning.
      
      The issue has been present for 4 years but surfaces only now that
      the first caller of dmaengine_desc_set_reuse() has been added in
      spi-bcm2835.c. Another user of reusable DMA descriptors has existed
      for a while in pxa_camera.c, but it sets the DMA_CTRL_REUSE flag
      directly instead of calling dmaengine_desc_set_reuse(). Nevertheless,
      tag this commit for stable in case there are out-of-tree users.
      
      Fixes: 27242021 ("dmaengine: Add DMA_CTRL_REUSE")
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Cc: stable@vger.kernel.org # v4.3+
      Link: https://lore.kernel.org/r/ca92998ccc054b4f2bfd60ef3adbab2913171eac.1575546234.git.lukas@wunner.deSigned-off-by: NVinod Koul <vkoul@kernel.org>
      53a256a9
  12. 10 12月, 2019 1 次提交
  13. 27 5月, 2019 1 次提交
  14. 21 5月, 2019 1 次提交
  15. 30 7月, 2018 1 次提交
  16. 10 7月, 2018 1 次提交
    • M
      dmaengine: add support for reporting pause and resume separately · d8095f94
      Marek Szyprowski 提交于
      'cmd_pause' DMA channel capability means that respective DMA engine
      supports both pausing and resuming given DMA channel. However, in some
      cases it is important to know if DMA channel can be paused without the
      need to resume it. This is a typical requirement for proper residue
      reading on transfer timeout in UART drivers. There are also some DMA
      engines with limited hardware, which doesn't really support resuming.
      
      Reporting pause and resume capabilities separately allows UART drivers to
      properly check for the really required capabilities and operate in DMA
      mode also in systems with limited DMA hardware. On the other hand drivers,
      which rely on full channel suspend/resume support, should now check for
      both 'pause' and 'resume' features.
      
      Existing clients of dma_get_slave_caps() have been checked and the only
      driver which rely on proper channel resuming is soc-generic-dmaengine-pcm
      driver, which has been updated to check the newly added capability.
      Existing 'cmd_pause' now only indicates that DMA engine support pausing
      given DMA channel.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Acked-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NVinod Koul <vkoul@kernel.org>
      d8095f94
  17. 12 2月, 2018 1 次提交
  18. 22 9月, 2017 2 次提交
  19. 28 8月, 2017 1 次提交
    • A
      dmaengine: add DMA_PREP_CMD for non-Data descriptors. · 3e00ab4a
      Abhishek Sahu 提交于
      Some of the DMA controllers are capable of issuing the commands
      to peripheral by the DMA. These commands can be list of register
      reads/writes and its different from normal data reads/writes.
      This patch adds new flag DMA_PREP_CMD in DMA API which tells
      the driver that the data passed to DMA API is command data
      and DMA controller driver will form descriptor in the required
      format.
      
      This flag can be used by any DMA controller driver which requires
      the descriptor in different format for non-Data descriptors.
      Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      3e00ab4a
  20. 22 8月, 2017 1 次提交
  21. 31 1月, 2017 1 次提交
  22. 30 11月, 2016 1 次提交
  23. 08 8月, 2016 1 次提交
  24. 12 4月, 2016 1 次提交
  25. 22 2月, 2016 1 次提交
  26. 09 2月, 2016 1 次提交
  27. 18 12月, 2015 1 次提交
    • P
      dmaengine: core: Introduce new, universal API to request a channel · a8135d0d
      Peter Ujfalusi 提交于
      The two API function can cover most, if not all current APIs used to
      request a channel. With minimal effort dmaengine drivers, platforms and
      dmaengine user drivers can be converted to use the two function.
      
      struct dma_chan *dma_request_chan_by_mask(const dma_cap_mask_t *mask);
      
      To request any channel matching with the requested capabilities, can be
      used to request channel for memcpy, memset, xor, etc where no hardware
      synchronization is needed.
      
      struct dma_chan *dma_request_chan(struct device *dev, const char *name);
      To request a slave channel. The dma_request_chan() will try to find the
      channel via DT, ACPI or in case if the kernel booted in non DT/ACPI mode
      it will use a filter lookup table and retrieves the needed information from
      the dma_slave_map provided by the DMA drivers.
      This legacy mode needs changes in platform code, in dmaengine drivers and
      finally the dmaengine user drivers can be converted:
      
      For each dmaengine driver an array of DMA device, slave and the parameter
      for the filter function needs to be added:
      
      static const struct dma_slave_map da830_edma_map[] = {
      	{ "davinci-mcasp.0", "rx", EDMA_FILTER_PARAM(0, 0) },
      	{ "davinci-mcasp.0", "tx", EDMA_FILTER_PARAM(0, 1) },
      	{ "davinci-mcasp.1", "rx", EDMA_FILTER_PARAM(0, 2) },
      	{ "davinci-mcasp.1", "tx", EDMA_FILTER_PARAM(0, 3) },
      	{ "davinci-mcasp.2", "rx", EDMA_FILTER_PARAM(0, 4) },
      	{ "davinci-mcasp.2", "tx", EDMA_FILTER_PARAM(0, 5) },
      	{ "spi_davinci.0", "rx", EDMA_FILTER_PARAM(0, 14) },
      	{ "spi_davinci.0", "tx", EDMA_FILTER_PARAM(0, 15) },
      	{ "da830-mmc.0", "rx", EDMA_FILTER_PARAM(0, 16) },
      	{ "da830-mmc.0", "tx", EDMA_FILTER_PARAM(0, 17) },
      	{ "spi_davinci.1", "rx", EDMA_FILTER_PARAM(0, 18) },
      	{ "spi_davinci.1", "tx", EDMA_FILTER_PARAM(0, 19) },
      };
      
      This information is going to be needed by the dmaengine driver, so
      modification to the platform_data is needed, and the driver map should be
      added to the pdata of the DMA driver:
      
      da8xx_edma0_pdata.slave_map = da830_edma_map;
      da8xx_edma0_pdata.slavecnt = ARRAY_SIZE(da830_edma_map);
      
      The DMA driver then needs to configure the needed device -> filter_fn
      mapping before it registers with dma_async_device_register() :
      
      ecc->dma_slave.filter_map.map = info->slave_map;
      ecc->dma_slave.filter_map.mapcnt = info->slavecnt;
      ecc->dma_slave.filter_map.fn = edma_filter_fn;
      
      When neither DT or ACPI lookup is available the dma_request_chan() will
      try to match the requester's device name with the filter_map's list of
      device names, when a match found it will use the information from the
      dma_slave_map to get the channel with the dma_get_channel() internal
      function.
      Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      a8135d0d
  28. 05 12月, 2015 1 次提交