Skip to content

Commit 705d21a

Browse files
mshawcroftnashif
authored andcommitted
eth/mcux: Turn down the PHY debug verbosity.
The PHY debug code is useful while working specifically with the PHY state machine, but in general the frequent, periodic nature of the output is a hinderance. Turn down the verbosity, leave a local define available for anyone who specifically needs to see the PHY state machine debug. Change-Id: I40e59b6df5c29702813d3a554ea9e795a3761c65 Signed-off-by: Marcus Shawcroft <[email protected]>
1 parent fd96574 commit 705d21a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

drivers/ethernet/Kconfig.mcux

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ config ETH_MCUX_PHY_TICK_MS
2222
help
2323
Set the PHY status polling period.
2424

25+
config ETH_MCUX_PHY_EXTRA_DEBUG
26+
bool "Enable additional detailed PHY debug"
27+
default n
28+
help
29+
Enable additional PHY related debug information related to
30+
PHY status polling.
31+
2532
config ETH_MCUX_RX_BUFFERS
2633
int "Number of MCUX RX buffers"
2734
depends on ETH_MCUX

drivers/ethernet/eth_mcux.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ static void eth_mcux_phy_enter_reset(struct eth_context *context)
142142

143143
static void eth_mcux_phy_start(struct eth_context *context)
144144
{
145+
#ifdef CONFIG_ETH_MCUX_PHY_DETAILED_DEBUG
145146
SYS_LOG_DBG("phy_state=%s", phy_state_name(context->phy_state));
147+
#endif
146148

147149
context->enabled = true;
148150

@@ -164,7 +166,9 @@ static void eth_mcux_phy_start(struct eth_context *context)
164166

165167
void eth_mcux_phy_stop(struct eth_context *context)
166168
{
169+
#ifdef CONFIG_ETH_MCUX_PHY_DETAILED_DEBUG
167170
SYS_LOG_DBG("phy_state=%s", phy_state_name(context->phy_state));
171+
#endif
168172

169173
context->enabled = false;
170174

@@ -199,8 +203,9 @@ static void eth_mcux_phy_event(struct eth_context *context)
199203
phy_speed_t phy_speed = kPHY_Speed100M;
200204
const uint32_t phy_addr = 0;
201205

206+
#ifdef CONFIG_ETH_MCUX_PHY_DETAILED_DEBUG
202207
SYS_LOG_DBG("phy_state=%s", phy_state_name(context->phy_state));
203-
208+
#endif
204209
switch (context->phy_state) {
205210
case eth_mcux_phy_state_initial:
206211
break;

0 commit comments

Comments
 (0)