Skip to content

Commit a410486

Browse files
agansarijhedberg
authored andcommitted
drivers: eth_mcux phy_setup moved after SMI init
SMI initialization is required to enable PHY communication. PHY setups needs to run after SMI initialization. Signed-off-by: Andrei Gansari <[email protected]>
1 parent a8703b8 commit a410486

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/ethernet/eth_mcux.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,8 +818,6 @@ static int eth_0_init(struct device *dev)
818818
k_delayed_work_init(&context->delayed_phy_work,
819819
eth_mcux_delayed_phy_work);
820820

821-
eth_mcux_phy_setup();
822-
823821
sys_clock = CLOCK_GetFreq(kCLOCK_CoreSysClk);
824822

825823
ENET_GetDefaultConfig(&enet_config);
@@ -881,6 +879,9 @@ static int eth_0_init(struct device *dev)
881879

882880
ENET_SetSMI(ENET, sys_clock, false);
883881

882+
/* handle PHY setup after SMI initialization */
883+
eth_mcux_phy_setup();
884+
884885
LOG_DBG("MAC %02x:%02x:%02x:%02x:%02x:%02x",
885886
context->mac_addr[0], context->mac_addr[1],
886887
context->mac_addr[2], context->mac_addr[3],

0 commit comments

Comments
 (0)