diff mbox series

[1/2] net: phy: Turn default auto-negotiation timeout into Kconfig symbol

Message ID 20240531164733.192105-1-marek.vasut+renesas@mailbox.org
State Accepted
Commit 4031a4299c43785bad9062859978bafe10efab58
Delegated to: Tom Rini
Headers show
Series [1/2] net: phy: Turn default auto-negotiation timeout into Kconfig symbol | expand

Commit Message

Marek Vasut May 31, 2024, 4:47 p.m. UTC
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>
---
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
---
 drivers/net/phy/Kconfig | 6 ++++++
 include/phy.h           | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

Comments

Tom Rini June 14, 2024, 2:54 p.m. UTC | #1
On Fri, 31 May 2024 18:47:16 +0200, Marek Vasut wrote:

> 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.
> 
> 

Applied to u-boot/master, thanks!
Marek Vasut June 14, 2024, 8:26 p.m. UTC | #2
On 6/14/24 4:54 PM, Tom Rini wrote:
> On Fri, 31 May 2024 18:47:16 +0200, Marek Vasut wrote:
> 
>> 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.
>>
>>
> 
> Applied to u-boot/master, thanks!

next, right ?
Tom Rini June 14, 2024, 8:30 p.m. UTC | #3
On Fri, Jun 14, 2024 at 10:26:20PM +0200, Marek Vasut wrote:
> On 6/14/24 4:54 PM, Tom Rini wrote:
> > On Fri, 31 May 2024 18:47:16 +0200, Marek Vasut wrote:
> > 
> > > 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.
> > > 
> > > 
> > 
> > Applied to u-boot/master, thanks!
> 
> next, right ?


Yes, next, sigh, b4 was a bit funny on all of those patches since I was
in "master" not "next" at the time.
diff mbox series

Patch

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 3d96938eaba..73064b2af68 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -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"
diff --git a/include/phy.h b/include/phy.h
index 90b7e364101..072ed0961f4 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -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