net: ti: am65-cpsw: Cleanup resources before jump to kernel
PATCH 1/1 net: ti: am65-cpsw: Cleanup resources before jump to kernel
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.
--- drivers/net/ti/am65-cpsw-nuss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ti/am65-cpsw-nuss.c +1 -1
@@ -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, };
Signature · 1 line
2.35.0
Quoted 25 lines · Vignesh Raghavendra
In case fastboot over Ethernet,
am65_cpsw_stop()is not called unlessDM_FLAG_OS_PREPAREis set. Without call toam65_cpsw_stop(), DMA resources are not released thus leading to failures in kernel. Fix this by addingDM_FLAG_OS_PREPAREflag toam65_cpsw_nuss_portdriver.Reported-by Christian Gmeiner <[email protected]>Signed-off-by Vignesh Raghavendra <[email protected]>--- drivers/net/ti/am65-cpsw-nuss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ti/am65-cpsw-nuss.c +1
-2@@ -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, }; --
Quoted 2 lines
2.35.0
Quoted 9 lines · Vignesh Raghavendra
In case fastboot over Ethernet,
am65_cpsw_stop()is not called unlessDM_FLAG_OS_PREPAREis set. Without call toam65_cpsw_stop(), DMA resources are not released thus leading to failures in kernel. Fix this by addingDM_FLAG_OS_PREPAREflag toam65_cpsw_nuss_portdriver.Reported-by Christian Gmeiner <[email protected]>Signed-off-by Vignesh Raghavendra <[email protected]>Reviewed-by Ramon Fried <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom