* [U-Boot] [PATCH] dma: ti: k3-udma: Do not touch RT registers before channel configuration
@ 2019-04-25 6:38 Vignesh Raghavendra
2019-04-25 18:19 ` Grygorii Strashko
2019-05-03 18:20 ` Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Vignesh Raghavendra @ 2019-04-25 6:38 UTC (permalink / raw)
To: u-boot
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
Upcoming sysfw (2019.03) will not open the channelized firewalls during
init, it only going to do so in response to the channel configuration
message.
Remove the channel state checks done before the channel configuration and
move it after the configuration for warning purposes.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
drivers/dma/ti/k3-udma.c | 33 +++++++++------------------------
1 file changed, 9 insertions(+), 24 deletions(-)
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index f78a01aa8f8c..f896e2958755 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -575,14 +575,6 @@ static int udma_get_tchan(struct udma_chan *uc)
pr_debug("chan%d: got tchan%d\n", uc->id, uc->tchan->id);
- if (udma_is_chan_running(uc)) {
- dev_warn(ud->dev, "chan%d: tchan%d is running!\n", uc->id,
- uc->tchan->id);
- udma_stop(uc);
- if (udma_is_chan_running(uc))
- dev_err(ud->dev, "chan%d: won't stop!\n", uc->id);
- }
-
return 0;
}
@@ -602,14 +594,6 @@ static int udma_get_rchan(struct udma_chan *uc)
pr_debug("chan%d: got rchan%d\n", uc->id, uc->rchan->id);
- if (udma_is_chan_running(uc)) {
- dev_warn(ud->dev, "chan%d: rchan%d is running!\n", uc->id,
- uc->rchan->id);
- udma_stop(uc);
- if (udma_is_chan_running(uc))
- dev_err(ud->dev, "chan%d: won't stop!\n", uc->id);
- }
-
return 0;
}
@@ -652,14 +636,6 @@ static int udma_get_chan_pair(struct udma_chan *uc)
pr_debug("chan%d: got t/rchan%d pair\n", uc->id, chan_id);
- if (udma_is_chan_running(uc)) {
- dev_warn(ud->dev, "chan%d: t/rchan%d pair is running!\n",
- uc->id, chan_id);
- udma_stop(uc);
- if (udma_is_chan_running(uc))
- dev_err(ud->dev, "chan%d: won't stop!\n", uc->id);
- }
-
return 0;
}
@@ -1071,6 +1047,15 @@ static int udma_alloc_chan_resources(struct udma_chan *uc)
}
}
+ if (udma_is_chan_running(uc)) {
+ dev_warn(ud->dev, "chan%d: is running!\n", uc->id);
+ udma_stop(uc);
+ if (udma_is_chan_running(uc)) {
+ dev_err(ud->dev, "chan%d: won't stop!\n", uc->id);
+ goto err_free_res;
+ }
+ }
+
/* PSI-L pairing */
ret = udma_navss_psil_pair(ud, uc->src_thread, uc->dst_thread);
if (ret) {
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] dma: ti: k3-udma: Do not touch RT registers before channel configuration
2019-04-25 6:38 [U-Boot] [PATCH] dma: ti: k3-udma: Do not touch RT registers before channel configuration Vignesh Raghavendra
@ 2019-04-25 18:19 ` Grygorii Strashko
2019-05-02 7:27 ` Keerthy
2019-05-03 18:20 ` Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Grygorii Strashko @ 2019-04-25 18:19 UTC (permalink / raw)
To: u-boot
On 25.04.19 09:38, Vignesh Raghavendra wrote:
> From: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Upcoming sysfw (2019.03) will not open the channelized firewalls during
> init, it only going to do so in response to the channel configuration
> message.
>
> Remove the channel state checks done before the channel configuration and
> move it after the configuration for warning purposes.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> ---
> drivers/dma/ti/k3-udma.c | 33 +++++++++------------------------
> 1 file changed, 9 insertions(+), 24 deletions(-)
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
--
Best regards,
grygorii
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] dma: ti: k3-udma: Do not touch RT registers before channel configuration
2019-04-25 18:19 ` Grygorii Strashko
@ 2019-05-02 7:27 ` Keerthy
0 siblings, 0 replies; 4+ messages in thread
From: Keerthy @ 2019-05-02 7:27 UTC (permalink / raw)
To: u-boot
On 25/04/19 11:49 PM, Grygorii Strashko wrote:
>
>
> On 25.04.19 09:38, Vignesh Raghavendra wrote:
>> From: Peter Ujfalusi <peter.ujfalusi@ti.com>
>>
>> Upcoming sysfw (2019.03) will not open the channelized firewalls during
>> init, it only going to do so in response to the channel configuration
>> message.
>>
>> Remove the channel state checks done before the channel configuration and
>> move it after the configuration for warning purposes.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
>> ---
>> drivers/dma/ti/k3-udma.c | 33 +++++++++------------------------
>> 1 file changed, 9 insertions(+), 24 deletions(-)
>
> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tom,
This is needed for cpsw to work am65. Please pull this patch.
Thanks,
Keerthy
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] dma: ti: k3-udma: Do not touch RT registers before channel configuration
2019-04-25 6:38 [U-Boot] [PATCH] dma: ti: k3-udma: Do not touch RT registers before channel configuration Vignesh Raghavendra
2019-04-25 18:19 ` Grygorii Strashko
@ 2019-05-03 18:20 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2019-05-03 18:20 UTC (permalink / raw)
To: u-boot
On Thu, Apr 25, 2019 at 12:08:15PM +0530, Vignesh Raghavendra wrote:
> From: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Upcoming sysfw (2019.03) will not open the channelized firewalls during
> init, it only going to do so in response to the channel configuration
> message.
>
> Remove the channel state checks done before the channel configuration and
> move it after the configuration for warning purposes.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190503/2c578690/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-03 18:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-25 6:38 [U-Boot] [PATCH] dma: ti: k3-udma: Do not touch RT registers before channel configuration Vignesh Raghavendra
2019-04-25 18:19 ` Grygorii Strashko
2019-05-02 7:27 ` Keerthy
2019-05-03 18:20 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox