All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ti: am65-cpsw: Cleanup resources before jump to kernel
@ 2022-01-28  5:51 Vignesh Raghavendra
  2022-02-03  8:32 ` Ramon Fried
  2022-02-04  0:40 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Vignesh Raghavendra @ 2022-01-28  5:51 UTC (permalink / raw)
  To: Joe Hershberger, Ramon Fried, Tom Rini
  Cc: Vignesh Raghavendra, u-boot, Christian Gmeiner

In case fastboot over Ethernet, am65_cpsw_stop() is not called unless
DM_FLAG_OS_PREPARE is set. Without call to am65_cpsw_stop(), DMA
resources are not released thus leading to failures in kernel.
Fix this by adding DM_FLAG_OS_PREPARE flag to am65_cpsw_nuss_port
driver.

Reported-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 drivers/net/ti/am65-cpsw-nuss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index 454986ff15..87f51b3b99 100644
--- a/drivers/net/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ti/am65-cpsw-nuss.c
@@ -817,5 +817,5 @@ U_BOOT_DRIVER(am65_cpsw_nuss_port) = {
 	.ops	= &am65_cpsw_ops,
 	.priv_auto	= sizeof(struct am65_cpsw_priv),
 	.plat_auto	= sizeof(struct eth_pdata),
-	.flags = DM_FLAG_ALLOC_PRIV_DMA,
+	.flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE,
 };
-- 
2.35.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ti: am65-cpsw: Cleanup resources before jump to kernel
  2022-01-28  5:51 [PATCH] net: ti: am65-cpsw: Cleanup resources before jump to kernel Vignesh Raghavendra
@ 2022-02-03  8:32 ` Ramon Fried
  2022-02-04  0:40 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Ramon Fried @ 2022-02-03  8:32 UTC (permalink / raw)
  To: Vignesh Raghavendra
  Cc: Joe Hershberger, Tom Rini, U-Boot Mailing List, Christian Gmeiner

On Fri, Jan 28, 2022 at 7:51 AM Vignesh Raghavendra <vigneshr@ti.com> wrote:
>
> In case fastboot over Ethernet, am65_cpsw_stop() is not called unless
> DM_FLAG_OS_PREPARE is set. Without call to am65_cpsw_stop(), DMA
> resources are not released thus leading to failures in kernel.
> Fix this by adding DM_FLAG_OS_PREPARE flag to am65_cpsw_nuss_port
> driver.
>
> Reported-by: Christian Gmeiner <christian.gmeiner@gmail.com>
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> ---
>  drivers/net/ti/am65-cpsw-nuss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
> index 454986ff15..87f51b3b99 100644
> --- a/drivers/net/ti/am65-cpsw-nuss.c
> +++ b/drivers/net/ti/am65-cpsw-nuss.c
> @@ -817,5 +817,5 @@ U_BOOT_DRIVER(am65_cpsw_nuss_port) = {
>         .ops    = &am65_cpsw_ops,
>         .priv_auto      = sizeof(struct am65_cpsw_priv),
>         .plat_auto      = sizeof(struct eth_pdata),
> -       .flags = DM_FLAG_ALLOC_PRIV_DMA,
> +       .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE,
>  };
> --
> 2.35.0
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ti: am65-cpsw: Cleanup resources before jump to kernel
  2022-01-28  5:51 [PATCH] net: ti: am65-cpsw: Cleanup resources before jump to kernel Vignesh Raghavendra
  2022-02-03  8:32 ` Ramon Fried
@ 2022-02-04  0:40 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-02-04  0:40 UTC (permalink / raw)
  To: Vignesh Raghavendra
  Cc: Joe Hershberger, Ramon Fried, u-boot, Christian Gmeiner

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

On Fri, Jan 28, 2022 at 11:21:19AM +0530, Vignesh Raghavendra wrote:

> In case fastboot over Ethernet, am65_cpsw_stop() is not called unless
> DM_FLAG_OS_PREPARE is set. Without call to am65_cpsw_stop(), DMA
> resources are not released thus leading to failures in kernel.
> Fix this by adding DM_FLAG_OS_PREPARE flag to am65_cpsw_nuss_port
> driver.
> 
> Reported-by: Christian Gmeiner <christian.gmeiner@gmail.com>
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-04  0:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28  5:51 [PATCH] net: ti: am65-cpsw: Cleanup resources before jump to kernel Vignesh Raghavendra
2022-02-03  8:32 ` Ramon Fried
2022-02-04  0:40 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.