<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-op-linux/drivers/dma/sf-pdma, branch master</title>
<subtitle>Blackbird™ Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/'/>
<updated>2019-12-26T04:34:18+00:00</updated>
<entry>
<title>dmaengine: virt-dma: Add missing locking</title>
<updated>2019-12-26T04:34:18+00:00</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2019-12-16T10:53:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=51fe9cd2bd92d95fc200385187d346e293ceefc9'/>
<id>urn:sha1:51fe9cd2bd92d95fc200385187d346e293ceefc9</id>
<content type='text'>
Originally freeing descriptors was split into a locked and an unlocked
part. The locked part in vchan_get_all_descriptors() collected all
descriptors on a separate list_head. This was done to allow iterating
over that new list in vchan_dma_desc_free_list() without a lock held.

This became broken in 13bb26ae8850 ("dmaengine: virt-dma: don't always
free descriptor upon completion"). With this commit
vchan_dma_desc_free_list() no longer exclusively operates on the
separate list, but starts to put descriptors which can be reused back on
&amp;vc-&gt;desc_allocated. This list operation should have been locked, but
wasn't.
In the mean time drivers started to call vchan_dma_desc_free_list() with
their lock held so that we now have the situation that
vchan_dma_desc_free_list() is called locked from some drivers and
unlocked from others.
To clean this up we have to do two things:

1. Add missing locking in vchan_dma_desc_free_list()
2. Make sure drivers call vchan_dma_desc_free_list() unlocked

This needs to be done atomically, so in this patch the locking is added
and all drivers are fixed.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Reviewed-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Tested-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Reviewed-by: Green Wan &lt;green.wan@sifive.com&gt;
Tested-by: Green Wan &lt;green.wan@sifive.com&gt;
Link: https://lore.kernel.org/r/20191216105328.15198-3-s.hauer@pengutronix.de
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sf-pdma: move macro to header file</title>
<updated>2019-11-22T05:45:28+00:00</updated>
<author>
<name>Green Wan</name>
<email>green.wan@sifive.com</email>
</author>
<published>2019-11-18T14:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=7d268a28ee336ae233b036057607fb73b844d512'/>
<id>urn:sha1:7d268a28ee336ae233b036057607fb73b844d512</id>
<content type='text'>
The place where the macro, SF_PDMA_REG_BASE(), is cause kernel-doc
using wrong function declaration. Move it to header file.

Signed-off-by: Green Wan &lt;green.wan@sifive.com&gt;
Link: https://lore.kernel.org/r/20191118143554.16129-2-green.wan@sifive.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sf-pdma: replace /** with /* for non-function comment</title>
<updated>2019-11-22T05:45:28+00:00</updated>
<author>
<name>Green Wan</name>
<email>green.wan@sifive.com</email>
</author>
<published>2019-11-18T14:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=dd9c324a5e96bfdc4c5c965da6fbd680340cd3f2'/>
<id>urn:sha1:dd9c324a5e96bfdc4c5c965da6fbd680340cd3f2</id>
<content type='text'>
There are several comments starting from "/**" but not for function
comment purpose. It causes kernel-doc parsing wrong string. Replace
"/**" with "/*" to fix them.

Signed-off-by: Green Wan &lt;green.wan@sifive.com&gt;
Link: https://lore.kernel.org/r/20191118143554.16129-1-green.wan@sifive.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00</title>
<updated>2019-11-14T07:10:46+00:00</updated>
<author>
<name>Green Wan</name>
<email>green.wan@sifive.com</email>
</author>
<published>2019-11-07T08:49:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=6973886ad58e6b4988813331abb76ae0b364a9c2'/>
<id>urn:sha1:6973886ad58e6b4988813331abb76ae0b364a9c2</id>
<content type='text'>
Add PDMA driver, sf-pdma, to enable DMA engine on HiFive Unleashed
Rev A00 board.

 - Implement dmaengine APIs, support MEM_TO_MEM async copy.
 - Tested by DMA Test client
 - Supports 4 channels DMA, each channel has 1 done and 1 err
   interrupt connected to platform-level interrupt controller (PLIC).
 - Depends on DMA_ENGINE and DMA_VIRTUAL_CHANNELS

The datasheet is here:

  https://static.dev.sifive.com/FU540-C000-v1.0.pdf

Follow the DMAengine controller doc,
"./Documentation/driver-api/dmaengine/provider.rst" to implement DMA
engine. And use the dma test client in doc,
"./Documentation/driver-api/dmaengine/dmatest.rst", to test.

Each DMA channel has separate HW regs and support done and error ISRs.
4 channels share 1 done and 1 err ISRs. There's no expander/arbitrator
in DMA HW.

   ------               ------
   |    |--&lt; done 23 &gt;--|ch 0|
   |    |--&lt; err  24 &gt;--|    |     (dma0chan0)
   |    |               ------
   |    |               ------
   |    |--&lt; done 25 &gt;--|ch 1|
   |    |--&lt; err  26 &gt;--|    |     (dma0chan1)
   |PLIC|               ------
   |    |               ------
   |    |--&lt; done 27 &gt;--|ch 2|
   |    |--&lt; err  28 &gt;--|    |     (dma0chan2)
   |    |               ------
   |    |               ------
   |    |--&lt; done 29 &gt;--|ch 3|
   |    |--&lt; err  30 &gt;--|    |     (dma0chan3)
   ------               ------

Signed-off-by: Green Wan &lt;green.wan@sifive.com&gt;
Link: https://lore.kernel.org/r/20191107084955.7580-4-green.wan@sifive.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
</feed>
