<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/dma/imx-sdma.c, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-07-12T14:42:25Z</updated>
<entry>
<title>dmaengine: imx-sdma: only restart cyclic channel when enabled</title>
<updated>2022-07-12T14:42:25Z</updated>
<author>
<name>Sascha Hauer</name>
</author>
<published>2022-06-17T11:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b6bd6c7fc286eb451bbfcc9ae7fc0395170534a'/>
<id>urn:sha1:1b6bd6c7fc286eb451bbfcc9ae7fc0395170534a</id>
<content type='text'>
commit 09f7b80fac3e588b282ad26aabd7336d7d293efd upstream.

An interrupt for a channel might be pending even after struct
dma_device::device_terminate_all has been called. In that case the
recently introduced warning message "restart cyclic channel..." triggers
and the channel will be restarted. This is not desired as the channel
has just been stopped. Only restart the channel when we still have a
descriptor set for it (which will be set to NULL in
sdma_terminate_all()).

Fixes: 5b215c28b9235 ("dmaengine: imx-sdma: restart cyclic channel if needed")
Cc: stable@vger.kernel.org
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20220617115042.4004062-1-s.hauer@pengutronix.de
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: imx-sdma: Allow imx8m for imx7 FW revs</title>
<updated>2022-07-12T14:42:24Z</updated>
<author>
<name>Peter Robinson</name>
</author>
<published>2022-06-06T16:10:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b07ff5e3f32aa359b06e1e75f8c6089b3ed5f45'/>
<id>urn:sha1:5b07ff5e3f32aa359b06e1e75f8c6089b3ed5f45</id>
<content type='text'>
commit a7cd3cf0b2e5aaacfe5e02c472bd28e98e640be7 upstream.

The revision of the imx-sdma IP that is in the i.MX8M series is the
same is that as that in the i.MX7 series but the imx7d MODULE_FIRMWARE
directive is wrapped in a condiditional which means it's not defined
when built for aarch64 SOC_IMX8M platforms and hence you get the
following errors when the driver loads on imx8m devices:

imx-sdma 302c0000.dma-controller: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2
imx-sdma 302c0000.dma-controller: external firmware not found, using ROM firmware

Add the SOC_IMX8M into the check so the firmware can load on i.MX8.

Fixes: 1474d48bd639 ("arm64: dts: imx8mq: Add SDMA nodes")
Fixes: 941acd566b18 ("dmaengine: imx-sdma: Only check ratio on parts that support 1:1")
Signed-off-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Cc: stable@vger.kernel.org   # v5.2+
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Link: https://lore.kernel.org/r/20220606161034.3544803-1-pbrobinson@gmail.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: imx-sdma: Fix error checking in sdma_event_remap</title>
<updated>2022-04-11T14:18:51Z</updated>
<author>
<name>Miaoqian Lin</name>
</author>
<published>2022-03-08T06:49:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7104b9cb35a33ad803a1adbbfa50569b008faf15'/>
<id>urn:sha1:7104b9cb35a33ad803a1adbbfa50569b008faf15</id>
<content type='text'>
of_parse_phandle() returns NULL on errors, rather than error
pointers. Using NULL check on grp_np to fix this.

Fixes: d078cd1b4185 ("dmaengine: imx-sdma: Add imx6sx platform support")
Signed-off-by: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Link: https://lore.kernel.org/r/20220308064952.15743-1-linmq006@gmail.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: imx-sdma: fix init of uart scripts</title>
<updated>2022-04-11T10:47:28Z</updated>
<author>
<name>Kevin Groeneveld</name>
</author>
<published>2022-04-10T22:31:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3ae97f4c87d9570e7e9a3e3324c443757f6e29a'/>
<id>urn:sha1:a3ae97f4c87d9570e7e9a3e3324c443757f6e29a</id>
<content type='text'>
Commit b98ce2f4e32b ("dmaengine: imx-sdma: add uart rom script") broke
uart rx on imx5 when using sdma firmware from older Freescale 2.6.35
kernel. In this case reading addr-&gt;uartXX_2_mcu_addr was going out of
bounds of the firmware memory and corrupting the uart script addresses.

Simply adding a bounds check before accessing addr-&gt;uartXX_2_mcu_addr
does not work as the uartXX_2_mcu_addr members are now beyond the size
of the older firmware and the uart addresses would never be populated
in that case. There are other ways to fix this but overall the logic
seems clearer to me to revert the uartXX_2_mcu_ram_addr structure
entries back to uartXX_2_mcu_addr, change the newer entries to
uartXX_2_mcu_rom_addr and update the logic accordingly.

I have tested this patch on:
1. An i.MX53 system with sdma firmware from Freescale 2.6.35 kernel.
   Without this patch uart rx is broken in this scenario, with the
   patch uart rx is restored.
2. An i.MX6D system with no external sdma firmware. uart is okay with
   or without this patch.
3. An i.MX8MM system using current sdma-imx7d.bin firmware from
   linux-firmware. uart is okay with or without this patch and I
   confirmed the rom version of the uart script is being used which was
   the intention and reason for commit b98ce2f4e32b ("dmaengine:
   imx-sdma: add uart rom script") in the first place.

Fixes: b98ce2f4e32b ("dmaengine: imx-sdma: add uart rom script")
Cc: stable@vger.kernel.org
Signed-off-by: Kevin Groeneveld &lt;kgroeneveld@lenbrook.com&gt;
Reviewed-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Acked-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Link: https://lore.kernel.org/r/20220410223118.15086-1-kgroeneveld@lenbrook.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: imx-sdma: clean up some inconsistent indenting</title>
<updated>2022-03-11T06:59:23Z</updated>
<author>
<name>Yang Li</name>
</author>
<published>2022-02-17T01:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb7a444a5f9056bd138ed6b0cef013eb7826728c'/>
<id>urn:sha1:fb7a444a5f9056bd138ed6b0cef013eb7826728c</id>
<content type='text'>
Eliminate the following coccicheck warning:
./drivers/dma/imx-sdma.c:896:3-16: code aligned with following code on
line 897

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20220217011604.123106-1-yang.lee@linux.alibaba.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: imx-sdma: fix cyclic buffer race condition</title>
<updated>2022-02-15T05:41:06Z</updated>
<author>
<name>Tomasz Moń</name>
</author>
<published>2022-01-17T09:19:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=177360e04b70b1d3937471e42201cdbb831a82da'/>
<id>urn:sha1:177360e04b70b1d3937471e42201cdbb831a82da</id>
<content type='text'>
Assign buffer ownership to SDMA after invoking descriptor callback to
make sure that SDMA does not write to the buffer before it is read by
the CPU.

Signed-off-by: Tomasz Moń &lt;tomasz.mon@camlingroup.com&gt;
Link: https://lore.kernel.org/r/20220117091955.1038937-2-tomasz.mon@camlingroup.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: imx-sdma: restart cyclic channel if needed</title>
<updated>2022-02-15T05:41:06Z</updated>
<author>
<name>Tomasz Moń</name>
</author>
<published>2022-01-17T09:19:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b215c28b923539a04587b6a3f78a449f967ae32'/>
<id>urn:sha1:5b215c28b923539a04587b6a3f78a449f967ae32</id>
<content type='text'>
Under heavy load resulting in high interrupt latencies, it is possible
for imx UART requests to completely fill DMA buffer. When DMA channel
is triggered and no SDMA owned buffer is available, SDMA stops. Thanks
to the autoRTS feature, there is no data loss due to the SDMA stop if
the UART is using hardware flow control.

According to DMA Engine API Guide, DMA cyclic operation is performed
until explicitly stopped. Restart the buffer after handling channel loop
if the channel was stopped by SDMA.

Signed-off-by: Tomasz Moń &lt;tomasz.mon@camlingroup.com&gt;
Link: https://lore.kernel.org/r/20220117091955.1038937-1-tomasz.mon@camlingroup.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: imx-sdma: remove space after sizeof</title>
<updated>2021-10-18T06:45:39Z</updated>
<author>
<name>Flavio Suligoi</name>
</author>
<published>2021-09-28T15:18:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=635156d94b644a4000ff19c4fff68a60afff279f'/>
<id>urn:sha1:635156d94b644a4000ff19c4fff68a60afff279f</id>
<content type='text'>
Space prohibited between function name and
open parenthesis '('

Signed-off-by: Flavio Suligoi &lt;f.suligoi@asem.it&gt;
Link: https://lore.kernel.org/r/20210928151833.589843-4-f.suligoi@asem.it
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: imx-sdma: align statement to open parenthesis</title>
<updated>2021-10-18T06:45:39Z</updated>
<author>
<name>Flavio Suligoi</name>
</author>
<published>2021-09-28T15:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df7cc2aa399304593ab806d147168150b0a878dd'/>
<id>urn:sha1:df7cc2aa399304593ab806d147168150b0a878dd</id>
<content type='text'>
Alignment should match open parenthesis.

Signed-off-by: Flavio Suligoi &lt;f.suligoi@asem.it&gt;
Link: https://lore.kernel.org/r/20210928151833.589843-3-f.suligoi@asem.it
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: imx-sdma: add missed braces</title>
<updated>2021-10-18T06:45:39Z</updated>
<author>
<name>Flavio Suligoi</name>
</author>
<published>2021-09-28T15:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f8595efae8dbc457fe98ca0d6b8f81a7c5477ce'/>
<id>urn:sha1:1f8595efae8dbc457fe98ca0d6b8f81a7c5477ce</id>
<content type='text'>
The "if" conditional statement is not a single statement,
so both branches require braces.

Signed-off-by: Flavio Suligoi &lt;f.suligoi@asem.it&gt;
Link: https://lore.kernel.org/r/20210928151833.589843-2-f.suligoi@asem.it
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
</feed>
