summaryrefslogtreecommitdiff
path: root/board/st/stm32f746-disco/stm32f746-disco.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/st/stm32f746-disco/stm32f746-disco.c')
-rw-r--r--board/st/stm32f746-disco/stm32f746-disco.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c
index 95d83e73ee8..69f657c54b8 100644
--- a/board/st/stm32f746-disco/stm32f746-disco.c
+++ b/board/st/stm32f746-disco/stm32f746-disco.c
@@ -117,16 +117,13 @@ int board_late_init(void)
int board_init(void)
{
#ifdef CONFIG_ETH_DESIGNWARE
- const char *phy_mode;
- int node;
+ ofnode node;
- node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,stm32-dwmac");
- if (node < 0)
+ node = ofnode_by_compatible(ofnode_null(), "st,stm32-dwmac");
+ if (!ofnode_valid(node))
return -1;
- phy_mode = fdt_getprop(gd->fdt_blob, node, "phy-mode", NULL);
-
- switch (phy_get_interface_by_name(phy_mode)) {
+ switch (ofnode_read_phy_mode(node)) {
case PHY_INTERFACE_MODE_RMII:
STM32_SYSCFG->pmc |= SYSCFG_PMC_MII_RMII_SEL;
break;
@@ -134,7 +131,7 @@ int board_init(void)
STM32_SYSCFG->pmc &= ~SYSCFG_PMC_MII_RMII_SEL;
break;
default:
- printf("PHY interface %s not supported !\n", phy_mode);
+ printf("Unsupported PHY interface!\n");
}
#endif