<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/dma/apple-admac.c, branch v6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-03-31T12:47:21Z</updated>
<entry>
<title>dmaengine: apple-admac: Fix 'current_tx' not getting freed</title>
<updated>2023-03-31T12:47:21Z</updated>
<author>
<name>Martin Povišer</name>
<email>povik+lin@cutebit.org</email>
</author>
<published>2023-02-24T15:22:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d9503be5a100c553731c0e8a82c7b4201e8a970c'/>
<id>urn:sha1:d9503be5a100c553731c0e8a82c7b4201e8a970c</id>
<content type='text'>
In terminate_all we should queue up all submitted descriptors to be
freed. We do that for the content of the 'issued' and 'submitted' lists,
but the 'current_tx' descriptor falls through the cracks as it's
removed from the 'issued' list once it gets assigned to be the current
descriptor. Explicitly queue up freeing of the 'current_tx' descriptor
to address a memory leak that is otherwise present.

Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver")
Signed-off-by: Martin Povišer &lt;povik+lin@cutebit.org&gt;
Link: https://lore.kernel.org/r/20230224152222.26732-2-povik+lin@cutebit.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: apple-admac: Set src_addr_widths capability</title>
<updated>2023-03-31T12:47:21Z</updated>
<author>
<name>Martin Povišer</name>
<email>povik+lin@cutebit.org</email>
</author>
<published>2023-02-24T15:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6e96adcaa7a29827ac8ee8df290a44957a4823ec'/>
<id>urn:sha1:6e96adcaa7a29827ac8ee8df290a44957a4823ec</id>
<content type='text'>
Add missing setting of 'src_addr_widths', which is the same as for the
other direction.

Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver")
Signed-off-by: Martin Povišer &lt;povik+lin@cutebit.org&gt;
Link: https://lore.kernel.org/r/20230224152222.26732-3-povik+lin@cutebit.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: apple-admac: Handle 'global' interrupt flags</title>
<updated>2023-03-31T12:47:21Z</updated>
<author>
<name>Martin Povišer</name>
<email>povik+lin@cutebit.org</email>
</author>
<published>2023-02-24T15:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a288fd158fbf85c06a9ac01cecabf97ac5d962e7'/>
<id>urn:sha1:a288fd158fbf85c06a9ac01cecabf97ac5d962e7</id>
<content type='text'>
In addition to TX channel and RX channel interrupt flags there's
another class of 'global' interrupt flags with unknown semantics. Those
weren't being handled up to now, and they are the suspected cause of
stuck IRQ states that have been sporadically occurring. Check the global
flags and clear them if raised.

Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver")
Signed-off-by: Martin Povišer &lt;povik+lin@cutebit.org&gt;
Link: https://lore.kernel.org/r/20230224152222.26732-1-povik+lin@cutebit.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fixes' into next</title>
<updated>2022-11-11T06:44:26Z</updated>
<author>
<name>Vinod Koul</name>
<email>vkoul@kernel.org</email>
</author>
<published>2022-11-11T06:44:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f134c9511d624ccbe6fa0c7c1e457c4ff89d94d'/>
<id>urn:sha1:3f134c9511d624ccbe6fa0c7c1e457c4ff89d94d</id>
<content type='text'>
Merge due to at_hdmac driver dependency
</content>
</entry>
<entry>
<title>dmaengine: apple-admac: Fix grabbing of channels in of_xlate</title>
<updated>2022-11-08T05:13:56Z</updated>
<author>
<name>Martin Povišer</name>
<email>povik+lin@cutebit.org</email>
</author>
<published>2022-10-19T13:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8454f880c24bca0d9d4bfb6ed4a4a5429a4d9b20'/>
<id>urn:sha1:8454f880c24bca0d9d4bfb6ed4a4a5429a4d9b20</id>
<content type='text'>
The of_xlate callback is supposed to return the channel after already
having 'grabbed' it for private use, so fill that in.

Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver")
Signed-off-by: Martin Povišer &lt;povik+lin@cutebit.org&gt;
Link: https://lore.kernel.org/r/20221019132324.8585-1-povik+lin@cutebit.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: apple-admac: Allocate cache SRAM to channels</title>
<updated>2022-10-19T16:54:57Z</updated>
<author>
<name>Martin Povišer</name>
<email>povik+lin@cutebit.org</email>
</author>
<published>2022-10-19T13:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=568aa6dd641f63166bb60d769e256789b3ac42d4'/>
<id>urn:sha1:568aa6dd641f63166bb60d769e256789b3ac42d4</id>
<content type='text'>
There's a previously unknown part of the controller interface: We have
to assign SRAM carveouts to channels to store their in-flight samples
in. So, obtain the size of the SRAM from a read-only register and divide
it into 2K blocks for allocation to channels. The FIFO depths we
configure will always fit into 2K.

(This fixes audio artifacts during simultaneous playback/capture on
multiple channels -- which looking back is fully accounted for by having
had the caches in the DMA controller overlap in memory.)

Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver")
Signed-off-by: Martin Povišer &lt;povik+lin@cutebit.org&gt;
Link: https://lore.kernel.org/r/20221019132324.8585-2-povik+lin@cutebit.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: apple-admac: Trigger shared reset</title>
<updated>2022-09-29T16:13:25Z</updated>
<author>
<name>Martin Povišer</name>
<email>povik+lin@cutebit.org</email>
</author>
<published>2022-09-18T09:58:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6aed75d7ccb3288029287c50fc594a4314698be0'/>
<id>urn:sha1:6aed75d7ccb3288029287c50fc594a4314698be0</id>
<content type='text'>
If a reset domain is attached to the device, obtain a shared reference
to it and trigger it. Typically on a chip the ADMAC controller will
share a reset domain with the MCA peripheral.

Signed-off-by: Martin Povišer &lt;povik+lin@cutebit.org&gt;
Link: https://lore.kernel.org/r/20220918095845.68860-5-povik+lin@cutebit.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: apple-admac: Do not use devres for IRQs</title>
<updated>2022-09-29T16:13:25Z</updated>
<author>
<name>Martin Povišer</name>
<email>povik+lin@cutebit.org</email>
</author>
<published>2022-09-18T09:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=072431595a57bc6605c29724afce5f9ef8114915'/>
<id>urn:sha1:072431595a57bc6605c29724afce5f9ef8114915</id>
<content type='text'>
This is in advance of adding support for triggering the reset signal to
the peripheral, since registering the IRQ handler will have to be
sequenced with it.

Signed-off-by: Martin Povišer &lt;povik+lin@cutebit.org&gt;
Link: https://lore.kernel.org/r/20220918095845.68860-4-povik+lin@cutebit.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: apple-admac: Use {low,upp}er_32_bits() to split 64-bit address</title>
<updated>2022-06-16T15:41:43Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2022-06-16T14:13:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce4b461ba2c1247e0508995ff250f156b5310441'/>
<id>urn:sha1:ce4b461ba2c1247e0508995ff250f156b5310441</id>
<content type='text'>
If CONFIG_PHYS_ADDR_T_64BIT is not set:

    drivers/dma/apple-admac.c: In function ‘admac_cyclic_write_one_desc’:
    drivers/dma/apple-admac.c:213:22: error: right shift count &gt;= width of type [-Werror=shift-count-overflow]
      213 |  writel_relaxed(addr &gt;&gt; 32,       ad-&gt;base + REG_DESC_WRITE(channo));
          |                      ^~

Fix this by using the {low,upp}er_32_bits() helper macros to obtain the
address parts.

Reported-by: noreply@ellerman.id.au
Fixes: b127315d9a78c011 ("dmaengine: apple-admac: Add Apple ADMAC driver")
Acked-by: Martin Povišer &lt;povik+lin@cutebit.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20220616141312.1953819-1-geert@linux-m68k.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: apple-admac: Fix print format</title>
<updated>2022-06-10T11:48:07Z</updated>
<author>
<name>Vinod Koul</name>
<email>vkoul@kernel.org</email>
</author>
<published>2022-06-10T04:31:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=11a72ae911d3d4eccfba8dbf21daca4ce5f1b6af'/>
<id>urn:sha1:11a72ae911d3d4eccfba8dbf21daca4ce5f1b6af</id>
<content type='text'>
We get a warning (treated as error now)
drivers/dma/apple-admac.c: In function 'admac_cyclic_write_one_desc':
drivers/dma/apple-admac.c:209:26: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Werror=format=]
  209 |         dev_dbg(ad-&gt;dev, "ch%d descriptor: addr=0x%pad len=0x%zx flags=0x%x\n",

Use %lx for priniting the flag

Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Link: https://lore.kernel.org/r/20220610043117.39337-1-vkoul@kernel.org
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
</feed>
