<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/dma/sprd-dma.c, branch linux-5.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-11-14T10:33:35Z</updated>
<entry>
<title>dmaengine: sprd: Add wrap address support for link-list mode</title>
<updated>2019-11-14T10:33:35Z</updated>
<author>
<name>Eric Long</name>
</author>
<published>2019-10-23T06:31:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7e335deed174a37fc6f84f69caaeff8a08f8ff8'/>
<id>urn:sha1:a7e335deed174a37fc6f84f69caaeff8a08f8ff8</id>
<content type='text'>
The Spreadtrum Audio compress offload mode will use 2-stage DMA transfer
to save power. That means we can request 2 dma channels, one for source
channel, and another one for destination channel. Once the source channel's
transaction is done, it will trigger the destination channel's transaction
automatically by hardware signal.

In this case, the source channel will transfer data from IRAM buffer to
the DSP fifo to decoding/encoding, once IRAM buffer is empty by transferring
done, the destination channel will start to transfer data from DDR buffer
to IRAM buffer. Since the destination channel will use link-list mode to
fill the IRAM data, and IRAM buffer is allocated by 32K, and DDR buffer
is larger to 2M, that means we need lots of link-list nodes to do a cyclic
transfer, instead wasting lots of link-list memory, we can use wrap address
support to reduce link-list node number, which means when the transfer
address reaches the wrap address, the transfer address will jump to the
wrap_to address specified by wrap_to register, and only 2 link-list nodes
can do a cyclic transfer to transfer data from DDR to IRAM.

Thus this patch adds wrap address to support this case.

[Baolin Wang changes the commit message]
Signed-off-by: Eric Long &lt;eric.long@unisoc.com&gt;
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Link: https://lore.kernel.org/r/85a5484bc1f3dd53ce6f92700ad8b35f30a0b096.1571812029.git.baolin.wang@linaro.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fixes' into next</title>
<updated>2019-11-14T10:32:51Z</updated>
<author>
<name>Vinod Koul</name>
</author>
<published>2019-11-14T10:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb5a471de9bfd0853d48d8dc5572469778c2824d'/>
<id>urn:sha1:bb5a471de9bfd0853d48d8dc5572469778c2824d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>dmaengine: sprd: Fix the possible memory leak issue</title>
<updated>2019-10-15T10:17:24Z</updated>
<author>
<name>Baolin Wang</name>
</author>
<published>2019-10-09T09:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec1ac309596a7bdf206743b092748205f6cd5720'/>
<id>urn:sha1:ec1ac309596a7bdf206743b092748205f6cd5720</id>
<content type='text'>
If we terminate the channel to free all descriptors associated with this
channel, we will leak the memory of current descriptor if the current
descriptor is not completed, since it had been deteled from the desc_issued
list and have not been added into the desc_completed list.

Thus we should check if current descriptor is completed or not, when freeing
the descriptors associated with one channel, if not, we should free it to
avoid this issue.

Fixes: 9b3b8171f7f4 ("dmaengine: sprd: Add Spreadtrum DMA driver")
Reported-by: Zhenfang Wang &lt;zhenfang.wang@unisoc.com&gt;
Tested-by: Zhenfang Wang &lt;zhenfang.wang@unisoc.com&gt;
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Link: https://lore.kernel.org/r/170dbbc6d5366b6fa974ce2d366652e23a334251.1570609788.git.baolin.wang@linaro.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sprd: Change to use devm_platform_ioremap_resource()</title>
<updated>2019-10-15T10:12:52Z</updated>
<author>
<name>Baolin Wang</name>
</author>
<published>2019-09-27T03:29:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f228a4a24492b9b147ce4efdd384e064d659e38a'/>
<id>urn:sha1:f228a4a24492b9b147ce4efdd384e064d659e38a</id>
<content type='text'>
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together, which can simpify the code.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Link: https://lore.kernel.org/r/1af3efdac3b217203cace090c8947386854c0144.1569554639.git.baolin.wang@linaro.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sprd: Fix the link-list pointer register configuration issue</title>
<updated>2019-10-14T05:02:18Z</updated>
<author>
<name>Zhenfang Wang</name>
</author>
<published>2019-09-12T05:47:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b6bc5fd71e677864d1a3b896b3069a6e0c5e214'/>
<id>urn:sha1:8b6bc5fd71e677864d1a3b896b3069a6e0c5e214</id>
<content type='text'>
We will set the link-list pointer register point to next link-list
configuration's physical address, which can load DMA configuration
from the link-list node automatically.

But the link-list node's physical address can be larger than 32bits,
and now Spreadtrum DMA driver only supports 32bits physical address,
which may cause loading a incorrect DMA configuration when starting
the link-list transfer mode. According to the DMA datasheet, we can
use SRC_BLK_STEP register (bit28 - bit31) to save the high bits of the
link-list node's physical address to fix this issue.

Fixes: 4ac695464763 ("dmaengine: sprd: Support DMA link-list mode")
Signed-off-by: Zhenfang Wang &lt;zhenfang.wang@unisoc.com&gt;
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Link: https://lore.kernel.org/r/eadfe9295499efa003e1c344e67e2890f9d1d780.1568267061.git.baolin.wang@linaro.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sprd: Fix the DMA link-list configuration</title>
<updated>2019-09-04T05:55:38Z</updated>
<author>
<name>Baolin Wang</name>
</author>
<published>2019-08-30T07:37:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=689379c2f383b1fdfdff03e84cf659daf62f2088'/>
<id>urn:sha1:689379c2f383b1fdfdff03e84cf659daf62f2088</id>
<content type='text'>
For the Spreadtrum DMA link-list mode, when the DMA engine got a slave
hardware request, which will trigger the DMA engine to load the DMA
configuration from the link-list memory automatically. But before the
slave hardware request, the slave will get an incorrect residue due
to the first node used to trigger the link-list was configured as the
last source address and destination address.

Thus we should make sure the first node was configured the start source
address and destination address, which can fix this issue.

Fixes: 4ac695464763 ("dmaengine: sprd: Support DMA link-list mode")
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Link: https://lore.kernel.org/r/77868edb7aff9d5cb12ac3af8827ef2e244441a6.1567150471.git.baolin.wang@linaro.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sprd: Add interrupt support for 2-stage transfer</title>
<updated>2019-05-21T13:53:54Z</updated>
<author>
<name>Baolin Wang</name>
</author>
<published>2019-05-06T07:28:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bb9fe0cfbe0aa72fed906ade0590e1702815e5d'/>
<id>urn:sha1:9bb9fe0cfbe0aa72fed906ade0590e1702815e5d</id>
<content type='text'>
For 2-stage transfer, some users like Audio still need transaction interrupt
to notify when the 2-stage transfer is completed. Thus we should enable
2-stage transfer interrupt to support this feature.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sprd: Fix the right place to configure 2-stage transfer</title>
<updated>2019-05-21T13:53:54Z</updated>
<author>
<name>Eric Long</name>
</author>
<published>2019-05-06T07:28:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c434e377dad1dec05cad1870ce21bc539e1e024f'/>
<id>urn:sha1:c434e377dad1dec05cad1870ce21bc539e1e024f</id>
<content type='text'>
Move the 2-stage configuration before configuring the link-list mode,
since we will use some 2-stage configuration to fill the link-list
configuration.

Signed-off-by: Eric Long &lt;eric.long@unisoc.com&gt;
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sprd: Fix block length overflow</title>
<updated>2019-05-21T13:53:54Z</updated>
<author>
<name>Eric Long</name>
</author>
<published>2019-05-06T07:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89d03b3c126d683f7b2cd5b07178493993d12448'/>
<id>urn:sha1:89d03b3c126d683f7b2cd5b07178493993d12448</id>
<content type='text'>
The maximum value of block length is 0xffff, so if the configured transfer length
is more than 0xffff, that will cause block length overflow to lead a configuration
error.

Thus we can set block length as the maximum burst length to avoid this issue, since
the maximum burst length will not be a big value which is more than 0xffff.

Signed-off-by: Eric Long &lt;eric.long@unisoc.com&gt;
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: sprd: Fix the incorrect start for 2-stage destination channels</title>
<updated>2019-05-21T13:53:54Z</updated>
<author>
<name>Eric Long</name>
</author>
<published>2019-05-06T07:28:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d626a97f0303e9c30d063434b749de3f0f91fb5'/>
<id>urn:sha1:3d626a97f0303e9c30d063434b749de3f0f91fb5</id>
<content type='text'>
The 2-stage destination channel will be triggered by source channel
automatically, which means we should not trigger it by software request.

Signed-off-by: Eric Long &lt;eric.long@unisoc.com&gt;
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
</feed>
