1. 16 7月, 2014 4 次提交
  2. 20 1月, 2014 2 次提交
    • L
      dma: pl330: Use dma_get_slave_channel() in the of xlate callback · 70cbb163
      Lars-Peter Clausen 提交于
      Currently the driver uses dma_request_channel() with a custom filter function to
      find the requested channel. This will loop over all available channels until the
      one we want has been found, but we already know which channel we want to
      request, so we can dma_get_slave_channel(). This also makes the code a bit
      shorter cleaner.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      70cbb163
    • L
      dma: pl330: Differentiate between submitted and issued descriptors · 04abf5da
      Lars-Peter Clausen 提交于
      The pl330 dmaengine driver currently does not differentiate between submitted
      and issued descriptors. It won't start transferring a newly submitted
      descriptor until issue_pending() is called, but only if it is idle. If it is
      active and a new descriptor is submitted before it goes idle it will happily
      start the newly submitted descriptor once all earlier submitted descriptors have
      been completed. This is not a 100% correct with regards to the dmaengine
      interface semantics. A descriptor is not supposed to be started until the next
      issue_pending() call after the descriptor has been submitted. This patch adds a
      second per channel list that keeps track of the submitted descriptors. Once
      issue_pending() is called the submitted descriptors are moved to the working
      list and only descriptors on the working list are started.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      04abf5da
  3. 15 1月, 2014 1 次提交
  4. 19 12月, 2013 1 次提交
    • W
      dma: pl330: ensure DMA descriptors are zero-initialised · 0baf8f6a
      Will Deacon 提交于
      I see the following splat with 3.13-rc1 when attempting to perform DMA:
      
      [  253.004516] Alignment trap: not handling instruction e1902f9f at [<c0204b40>]
      [  253.004583] Unhandled fault: alignment exception (0x221) at 0xdfdfdfd7
      [  253.004646] Internal error: : 221 [#1] PREEMPT SMP ARM
      [  253.004691] Modules linked in: dmatest(+) [last unloaded: dmatest]
      [  253.004798] CPU: 0 PID: 671 Comm: kthreadd Not tainted 3.13.0-rc1+ #2
      [  253.004864] task: df9b0900 ti: df03e000 task.ti: df03e000
      [  253.004937] PC is at dmaengine_unmap_put+0x14/0x34
      [  253.005010] LR is at pl330_tasklet+0x3c8/0x550
      [  253.005087] pc : [<c0204b44>]    lr : [<c0207478>]    psr: a00e0193
      [  253.005087] sp : df03fe48  ip : 00000000  fp : df03bf18
      [  253.005178] r10: bf00e108  r9 : 00000001  r8 : 00000000
      [  253.005245] r7 : df837040  r6 : dfb41800  r5 : df837048  r4 : df837000
      [  253.005316] r3 : dfdfdfcf  r2 : dfb41f80  r1 : df837048  r0 : dfdfdfd7
      [  253.005384] Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      [  253.005459] Control: 30c5387d  Table: 9fb9ba80  DAC: fffffffd
      [  253.005520] Process kthreadd (pid: 671, stack limit = 0xdf03e248)
      
      This is due to desc->txd.unmap containing garbage (uninitialised memory).
      
      Rather than add another dummy initialisation to _init_desc, instead
      ensure that the descriptors are zero-initialised during allocation and
      remove the dummy, per-field initialisation.
      
      Cc: Andriy Shevchenko <andriy.shevchenko@intel.com>
      Acked-by: NJassi Brar <jassisinghbrar@gmail.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NVinod Koul <vinod.koul@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      0baf8f6a
  5. 16 12月, 2013 1 次提交
  6. 14 11月, 2013 1 次提交
  7. 13 11月, 2013 2 次提交
  8. 31 10月, 2013 2 次提交
  9. 14 10月, 2013 1 次提交
  10. 07 10月, 2013 1 次提交
  11. 03 9月, 2013 1 次提交
  12. 28 8月, 2013 1 次提交
    • L
      dma: pl330: Fix handling of TERMINATE_ALL while processing completed descriptors · 39ff8613
      Lars-Peter Clausen 提交于
      The pl330 DMA driver is broken in regard to handling a terminate all request
      while it is processing the list of completed descriptors. This is most visible
      when calling dmaengine_terminate_all() from within the descriptors callback for
      cyclic transfers. In this case the TERMINATE_ALL transfer will clear the
      work_list and stop the transfer. But after all callbacks for all completed
      descriptors have been handled the descriptors will be re-enqueued into the (now
      empty) work_list. So the next time dma_async_issue_pending() is called for the
      channel these descriptors will be transferred again which will cause data
      corruption. Similar issues can occur if dmaengine_terminate_all() is not called
      from within the descriptor callback but runs on a different CPU at the same time
      as the completed descriptor list is processed.
      
      This patch introduces a new per channel list which will hold the completed
      descriptors. While processing the list the channel's lock will be held to avoid
      racing against dmaengine_terminate_all(). The lock will be released when calling
      the descriptors callback though. Since the list of completed descriptors might
      be modified (e.g. by calling dmaengine_terminate_all() from the callback) we can
      not use the normal list iterator macros. Instead we'll need to check for each
      loop iteration again if there are still items in the list. The drivers
      TERMINATE_ALL implementation is updated to move descriptors from both the
      work_list as well the new completed_list back to the descriptor pool. This makes
      sure that none of the descripts finds its way back into the work list and also
      that we do not call any futher complete callbacks after
      dmaengine_terminate_all() has been called.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      39ff8613
  13. 13 8月, 2013 2 次提交
  14. 28 7月, 2013 1 次提交
  15. 16 7月, 2013 1 次提交
    • L
      dma: pl330: Implement device_slave_caps · ca38ff13
      Lars-Peter Clausen 提交于
      Implement the device_slave_caps() callback for the pl330 driver. This allows
      dmaengine users like the generic ALSA dmaengine PCM driver to query the
      capabilities of the driver. The PL330 supports all buswidths and both
      mem-to-dev as well as dev-to-mem transfers. In theory there is no limit on the
      number of segments that can be transferred (in practice you'll run out of memory
      eventually) and the number of bytes per segment is limited by the size of the
      PL330 program buffer. Due to the nature of the PL330 the maximum number of bytes
      per segment depends on the burstsize, the driver sets it to the value for a
      1-byte burstsize, since it is the smallest.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      ca38ff13
  16. 05 7月, 2013 2 次提交
  17. 04 7月, 2013 1 次提交
  18. 15 4月, 2013 2 次提交
  19. 03 4月, 2013 1 次提交
  20. 14 2月, 2013 3 次提交
  21. 08 1月, 2013 1 次提交
  22. 04 1月, 2013 1 次提交
    • G
      Drivers: dma: remove __dev* attributes. · 4bf27b8b
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitconst,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Viresh Kumar <viresh.linux@gmail.com>
      Cc: Dan Williams <djbw@fb.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Barry Song <baohua.song@csr.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Alexander Duyck <alexander.h.duyck@intel.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Jassi Brar <jassisinghbrar@gmail.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4bf27b8b
  23. 29 11月, 2012 1 次提交
  24. 22 9月, 2012 1 次提交
  25. 18 9月, 2012 5 次提交