]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: Don't call board/cpu_eth_init() with driver model
authorSimon Glass <sjg@chromium.org>
Sun, 17 Jan 2016 21:51:56 +0000 (14:51 -0700)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 28 Jan 2016 18:32:45 +0000 (12:32 -0600)
We should avoid weak functions with driver model. Existing boards that use
driver model don't need them, so let's kill them off.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
net/eth.c

index 45fe6e3c1c08408d6245d4803df6a5f7ed8f4ced..d96d3a5f4585ee8a6ed49ceb07f88f0ca326ceb8 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -96,6 +96,7 @@ static void eth_common_init(void)
        phy_init();
 #endif
 
+#ifndef CONFIG_DM_ETH
        /*
         * If board-specific initialization exists, call it.
         * If not, call a CPU-specific one
@@ -107,10 +108,9 @@ static void eth_common_init(void)
                if (cpu_eth_init(gd->bd) < 0)
                        printf("CPU Net Initialization Failed\n");
        } else {
-#ifndef CONFIG_DM_ETH
                printf("Net Initialization Skipped\n");
-#endif
        }
+#endif
 }
 
 #ifdef CONFIG_DM_ETH