]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: ti: am65-cpsw: Cleanup resources before jump to kernel
authorVignesh Raghavendra <vigneshr@ti.com>
Fri, 28 Jan 2022 05:51:19 +0000 (11:21 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 3 Feb 2022 17:15:35 +0000 (12:15 -0500)
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>
drivers/net/ti/am65-cpsw-nuss.c

index 454986ff159f1f6356af7237a6ae761f5676ea61..87f51b3b99b6cb5da5797ab38c5cbd929d5f7d8f 100644 (file)
@@ -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,
 };