1. 15 May, 2020 4 commits
  2. 13 May, 2020 7 commits
  3. 04 May, 2020 3 commits
    • Alan Mikhak's avatar
      dmaengine: dw-edma: support local dma device transfer semantics · bd96f1b2
      Alan Mikhak authored
      Modify dw_edma_device_transfer() to also support the semantics of dma
      device transfer for additional use cases involving pcitest utility as a
      local initiator.
      
      For its original use case, dw-edma supported the semantics of dma device
      transfer from the perspective of a remote initiator who is located across
      the PCIe bus from dma channel hardware.
      
      To a remote initiator, DMA_DEV_TO_MEM means using a remote dma WRITE
      channel to transfer from remote memory to local memory. A WRITE channel
      would be employed on the remote device in order to move the contents of
      remote memory to the bus destined for local memory.
      
      To a remote initiator, DMA_MEM_TO_DEV means using a remote dma READ
      channel to transfer from local memory to remote memory. A READ channel
      would be employed on the remote device in order to move the contents of
      local memory to the bus destined for remote memory.
      
      >From the perspective of a local dma initiator who is co-located on the
      same side of the PCIe bus as the dma channel hardware, the semantics of
      dma device transfer are flipped.
      
      To a local initiator, DMA_DEV_TO_MEM means using a local dma READ channel
      to transfer from remote memory to local memory. A READ channel would be
      employed on the local device in order to move the contents of remote
      memory to the bus destined for local memory.
      
      To a local initiator, DMA_MEM_TO_DEV means using a local dma WRITE channel
      to transfer from local memory to remote memory. A WRITE channel would be
      employed on the local device in order to move the contents of local memory
      to the bus destined for remote memory.
      
      To support local dma initiators, dw_edma_device_transfer() is modified to
      now examine the direction field of struct dma_slave_config for the channel
      which initiators can configure by calling dmaengine_slave_config().
      
      If direction is configured as either DMA_DEV_TO_MEM or DMA_MEM_TO_DEV,
      local initiator semantics are used. If direction is a value other than
      DMA_DEV_TO_MEM nor DMA_MEM_TO_DEV, then remote initiator semantics are
      used. This should maintain backward compatibility with the original use
      case of dw-edma.
      
      The dw-edma-test utility is an example of a remote initiator. From reading
      its patch, dw-edma-test does not specifically set the direction field of
      struct dma_slave_config. Since dw_edma_device_transfer() also does not
      check the direction field of struct dma_slave_config, it seems safe to use
      this convention in dw-edma to support both local and remote initiator
      semantics.
      Signed-off-by: default avatarAlan Mikhak <alan.mikhak@sifive.com>
      Link: https://lore.kernel.org/r/1588122633-1552-1-git-send-email-alan.mikhak@sifive.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      bd96f1b2
    • Andy Shevchenko's avatar
      dmaengine: Fix doc strings to satisfy validation script · 9872e23d
      Andy Shevchenko authored
      The validation kernel doc script complains about undescribed
      function parameters
      
      .../dmaengine.c:155: warning: Function parameter or member 'dev' not descr ibed in 'dev_to_dma_chan'
      .../dmaengine.c:251: warning: cannot understand function prototype: 'dma_cap_mask_t dma_cap_mask_all; '
      .../dmaengine.c:257: warning: cannot understand function prototype: 'struct dma_chan_tbl_ent '
      .../dmaengine.c:264: warning: cannot understand function prototype: 'struct dma_chan_tbl_ent __percpu *channel_table[DMA_TX_TYPE_END]; '
      .../dmaengine.c:304: warning: Function parameter or member 'chan' not described in 'dma_chan_is_local'
      .../dmaengine.c:304: warning: Function parameter or member 'cpu' not described in 'dma_chan_is_local'
      .../dmaengine.c:414: warning: Function parameter or member 'chan' not described in 'balance_ref_count'
      .../dmaengine.c:447: warning: Function parameter or member 'chan' not described in 'dma_chan_get'
      .../dmaengine.c:494: warning: Function parameter or member 'chan' not described in 'dma_chan_put'
      
      Add descriptions to the function parameters and in some cases update
      existing text as well.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Link: https://lore.kernel.org/r/20200429122151.50989-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      9872e23d
    • Andy Shevchenko's avatar
      dmaengine: Include dmaengine.h into dmaengine.c · 833d88f3
      Andy Shevchenko authored
      Compiler is not happy about non-static functions due to missed inclusion
      
      .../dmaengine.c:682:18: warning: no previous prototype for ‘dma_get_slave_channel’ [-Wmissing-prototypes]
        682 | struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
            |                  ^~~~~~~~~~~~~~~~~~~~~
      .../dmaengine.c:713:18: warning: no previous prototype for ‘dma_get_any_slave_channel’ [-Wmissing-prototypes]
        713 | struct dma_chan *dma_get_any_slave_channel(struct dma_device *device)
            |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
      
      Include missed header to satisfy compiler.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Link: https://lore.kernel.org/r/20200429122151.50989-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      833d88f3
  4. 27 Apr, 2020 9 commits
  5. 23 Apr, 2020 7 commits
  6. 17 Apr, 2020 6 commits
  7. 15 Apr, 2020 3 commits
  8. 12 Apr, 2020 1 commit