1. 15 1月, 2014 1 次提交
    • L
      dma: Indicate residue granularity in dma_slave_caps · 50720563
      Lars-Peter Clausen 提交于
      This patch adds a new field to the dma_slave_caps struct which indicates the
      granularity with which the driver is able to update the residue field of the
      dma_tx_state struct. Making this information available to dmaengine users allows
      them to make better decisions on how to operate. E.g. for audio certain features
      like wakeup less operation or timer based scheduling only make sense and work
      correctly if the reported residue is fine-grained enough.
      
      Right now four different levels of granularity are supported:
      	* DESCRIPTOR: The DMA channel is only able to tell whether a descriptor has
      	  been completed or not, which means residue reporting is not supported by
      	  this channel. The residue field of the dma_tx_state field will always be
      	  0.
      	* SEGMENT: The DMA channel updates the residue field after each successfully
      	  completed segment of the transfer (For cyclic transfers this is after each
      	  period). This is typically implemented by having the hardware generate an
      	  interrupt after each transferred segment and then the drivers updates the
      	  outstanding residue by the size of the segment. Another possibility is if
      	  the hardware supports SG and the segment descriptor has a field which gets
      	  set after the segment has been completed. The driver then counts the
      	  number of segments without the flag set to compute the residue.
      	* BURST: The DMA channel updates the residue field after each transferred
      	  burst. This is typically only supported if the hardware has a progress
      	  register of some sort (E.g. a register with the current read/write address
      	  or a register with the amount of bursts/beats/bytes that have been
      	  transferred or still need to be transferred).
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NVinod Koul <vinod.koul@intel.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      50720563
  2. 10 12月, 2013 1 次提交
    • S
      dma: add channel request API that supports deferred probe · 0ad7c000
      Stephen Warren 提交于
      dma_request_slave_channel() simply returns NULL whenever DMA channel
      lookup fails. Lookup could fail for two distinct reasons:
      
      a) No DMA specification exists for the channel name.
         This includes situations where no DMA specifications exist at all, or
         other general lookup problems.
      
      b) A DMA specification does exist, yet the driver for that channel is not
         yet registered.
      
      Case (b) should trigger deferred probe in client drivers. However, since
      they have no way to differentiate the two situations, it cannot.
      
      Implement new function dma_request_slave_channel_reason(), which performs
      identically to dma_request_slave_channel(), except that it returns an
      error-pointer rather than NULL, which allows callers to detect when
      deferred probe should occur.
      
      Eventually, all drivers should be converted to this new API, the old API
      removed, and the new API renamed to the more desirable name. This patch
      doesn't convert the existing API and all drivers in one go, since some
      drivers call dma_request_slave_channel() then dma_request_channel() if
      that fails. That would require either modifying dma_request_channel() in
      the same way, or adding extra error-handling code to all affected
      drivers, and there are close to 100 drivers using the other API, rather
      than just the 15-20 or so that use dma_request_slave_channel(), which
      might be tenable in a single patch.
      
      acpi_dma_request_slave_chan_by_name() doesn't currently implement
      deferred probe. It should, but this will be addressed later.
      Acked-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      0ad7c000
  3. 15 11月, 2013 2 次提交
  4. 14 11月, 2013 2 次提交
  5. 25 10月, 2013 2 次提交
  6. 10 9月, 2013 1 次提交
  7. 02 9月, 2013 1 次提交
  8. 23 8月, 2013 1 次提交
  9. 13 8月, 2013 1 次提交
    • Z
      dmaengine: add interface of dma_get_slave_channel · 7bb587f4
      Zhangfei Gao 提交于
      Suggested by Arnd, add dma_get_slave_channel interface
      Dma host driver could get specific channel specificied by request line, rather than filter.
      
      host example:
      static struct dma_chan *xx_of_dma_simple_xlate(struct of_phandle_args *dma_spec,
      		struct of_dma *ofdma)
      {
      	struct xx_dma_dev *d = ofdma->of_dma_data;
      	unsigned int request = dma_spec->args[0];
      
      	if (request > d->dma_requests)
      		return NULL;
      
      	return dma_get_slave_channel(&(d->chans[request].vc.chan));
      }
      
      probe:
      of_dma_controller_register((&op->dev)->of_node, xx_of_dma_simple_xlate, d);
      Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      7bb587f4
  10. 16 7月, 2013 1 次提交
  11. 04 7月, 2013 1 次提交
  12. 15 4月, 2013 2 次提交
  13. 28 2月, 2013 1 次提交
  14. 14 2月, 2013 1 次提交
  15. 12 1月, 2013 1 次提交
  16. 08 1月, 2013 5 次提交
  17. 07 1月, 2013 2 次提交
  18. 25 9月, 2012 1 次提交
  19. 22 9月, 2012 1 次提交
  20. 20 6月, 2012 2 次提交
  21. 08 6月, 2012 1 次提交
  22. 01 6月, 2012 1 次提交
  23. 11 5月, 2012 1 次提交
  24. 06 4月, 2012 1 次提交
  25. 21 3月, 2012 2 次提交
  26. 13 3月, 2012 2 次提交
  27. 05 3月, 2012 1 次提交
    • P
      BUG: headers with BUG/BUG_ON etc. need linux/bug.h · 187f1882
      Paul Gortmaker 提交于
      If a header file is making use of BUG, BUG_ON, BUILD_BUG_ON, or any
      other BUG variant in a static inline (i.e. not in a #define) then
      that header really should be including <linux/bug.h> and not just
      expecting it to be implicitly present.
      
      We can make this change risk-free, since if the files using these
      headers didn't have exposure to linux/bug.h already, they would have
      been causing compile failures/warnings.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      187f1882
  28. 22 2月, 2012 1 次提交