]> git.baikalelectronics.ru Git - uboot.git/commitdiff
net: Pull board_interface_eth_init() into common code
authorMarek Vasut <marex@denx.de>
Mon, 6 Mar 2023 14:53:42 +0000 (15:53 +0100)
committerStefano Babic <sbabic@denx.de>
Thu, 30 Mar 2023 11:47:03 +0000 (13:47 +0200)
Move the board_interface_eth_init() into common ethernet uclass code,
since this function could be shared by multiple drivers.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
drivers/net/dwc_eth_qos.c
net/eth-uclass.c

index 112deb546dec7f22c2e26fd9ef8bec5a556f199c..0cae2cf2064eeea49bfdc295ed1e5f8ca25fd309 100644 (file)
@@ -1412,13 +1412,6 @@ err_free_reset_eqos:
        return ret;
 }
 
-/* board-specific Ethernet Interface initializations. */
-__weak int board_interface_eth_init(struct udevice *dev,
-                                   phy_interface_t interface_type)
-{
-       return 0;
-}
-
 static int eqos_probe_resources_stm32(struct udevice *dev)
 {
        struct eqos_priv *eqos = dev_get_priv(dev);
index b01a910938e1d2712144a0610995dc73c43c1c3e..c393600fabcda95f04c6820ac4c7cad260b740ad 100644 (file)
@@ -49,6 +49,13 @@ struct eth_uclass_priv {
 /* eth_errno - This stores the most recent failure code from DM functions */
 static int eth_errno;
 
+/* board-specific Ethernet Interface initializations. */
+__weak int board_interface_eth_init(struct udevice *dev,
+                                   phy_interface_t interface_type)
+{
+       return 0;
+}
+
 static struct eth_uclass_priv *eth_get_uclass_priv(void)
 {
        struct uclass *uc;