]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: phy: Turn default auto-negotiation timeout into Kconfig symbol
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Fri, 31 May 2024 16:47:16 +0000 (18:47 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 13 Jun 2024 22:27:06 +0000 (16:27 -0600)
Let users configure default auto-negotiation timeout via Kconfig
instead of specifying it in board configuration headers. This is
the first step toward converting this to Kconfig fully, so far the
legacy PHY_ANEG_TIMEOUT in configuration headers takes precedence.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
drivers/net/phy/Kconfig
include/phy.h

index 3d96938eabac6cce4f932c4434d2bf14e07d743a..73064b2af6883f0e4e4df3c0c4369beb4951e2a6 100644 (file)
@@ -23,6 +23,12 @@ config PHY_ADDR_ENABLE
        help
          Select this if you want to control which phy address is used
 
+config PHY_ANEG_TIMEOUT
+       int "PHY auto-negotiation timeout"
+       default 4000
+       help
+         Default PHY auto-negotiation timeout.
+
 if PHY_ADDR_ENABLE
 config PHY_ADDR
        int "PHY address"
index 90b7e364101b2d8358aca81026f70415faf4934d..072ed0961f4e70d2dc74ae9aecd97cfccdb2266c 100644 (file)
@@ -59,10 +59,9 @@ struct udevice;
                                SUPPORTED_10000baseT_Full)
 
 #ifndef PHY_ANEG_TIMEOUT
-#define PHY_ANEG_TIMEOUT       4000
+#define PHY_ANEG_TIMEOUT       CONFIG_PHY_ANEG_TIMEOUT
 #endif
 
-
 struct phy_device;
 
 #define MDIO_NAME_LEN 32