* [PATCH v2] dmaengine: imx-sdma: Fix the event id check to include RX event for UART6
@ 2020-02-25 8:23 Schrempf Frieder
2020-02-25 8:45 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Schrempf Frieder @ 2020-02-25 8:23 UTC (permalink / raw)
To: Dan Williams, Fabio Estevam, Linus Walleij, NXP Linux Team,
Pengutronix Kernel Team, Sascha Hauer, Shawn Guo, Vinod Koul
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Schrempf Frieder,
linux-arm-kernel@lists.infradead.org
From: Frieder Schrempf <frieder.schrempf@kontron.de>
On i.MX6UL/ULL and i.MX6SX the DMA event id for the RX channel of
UART6 is '0'. To fix the broken DMA support for UART6, we change
the check for event_id0 to include '0' as a valid id.
Fixes: 1ec1e82f2510 ("dmaengine: Add Freescale i.MX SDMA support")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
---
Changes in v2:
* Be more specific about the affected SoCs in the commit message
* Fix the prefix in the subject to 'dmaengine'
* Add Fabio's R-b tag
---
drivers/dma/imx-sdma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 066b21a32232..3d4aac97b1fc 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1331,7 +1331,7 @@ static void sdma_free_chan_resources(struct dma_chan *chan)
sdma_channel_synchronize(chan);
- if (sdmac->event_id0)
+ if (sdmac->event_id0 >= 0)
sdma_event_disable(sdmac, sdmac->event_id0);
if (sdmac->event_id1)
sdma_event_disable(sdmac, sdmac->event_id1);
@@ -1631,7 +1631,7 @@ static int sdma_config(struct dma_chan *chan,
memcpy(&sdmac->slave_config, dmaengine_cfg, sizeof(*dmaengine_cfg));
/* Set ENBLn earlier to make sure dma request triggered after that */
- if (sdmac->event_id0) {
+ if (sdmac->event_id0 >= 0) {
if (sdmac->event_id0 >= sdmac->sdma->drvdata->num_events)
return -EINVAL;
sdma_event_enable(sdmac, sdmac->event_id0);
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] dmaengine: imx-sdma: Fix the event id check to include RX event for UART6
2020-02-25 8:23 [PATCH v2] dmaengine: imx-sdma: Fix the event id check to include RX event for UART6 Schrempf Frieder
@ 2020-02-25 8:45 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-02-25 8:45 UTC (permalink / raw)
To: Schrempf Frieder
Cc: Linus Walleij, Sascha Hauer, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, NXP Linux Team, Pengutronix Kernel Team,
dmaengine@vger.kernel.org, Shawn Guo, Dan Williams, Fabio Estevam,
linux-arm-kernel@lists.infradead.org
On 25-02-20, 08:23, Schrempf Frieder wrote:
> From: Frieder Schrempf <frieder.schrempf@kontron.de>
>
> On i.MX6UL/ULL and i.MX6SX the DMA event id for the RX channel of
> UART6 is '0'. To fix the broken DMA support for UART6, we change
> the check for event_id0 to include '0' as a valid id.
Applied, thanks
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-25 8:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-25 8:23 [PATCH v2] dmaengine: imx-sdma: Fix the event id check to include RX event for UART6 Schrempf Frieder
2020-02-25 8:45 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox