summaryrefslogtreecommitdiff
path: root/board/dhelectronics/dh_stm32mp1/board.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-06-14 08:13:54 -0600
committerTom Rini <trini@konsulko.com>2024-06-14 08:13:54 -0600
commit2248c96ea1cf0b65377040d9f87ce7d8cf534c63 (patch)
tree365433ed536985085a2d906e490a826a648a1a54 /board/dhelectronics/dh_stm32mp1/board.c
parentca6a992e09441d6cca73439c63c3735f86b36ea4 (diff)
parent55df13d930f4f191f458a6454f4b8e614e19c215 (diff)
Merge tag 'u-boot-stm32-20240614' of https://source.denx.de/u-boot/custodians/u-boot-stm
STM32MP1: _ Fix spl compilation warning _ Fix optee_get_reserved_memory() _ Fix livetree conversion on STM32MP15xx DHSOM
Diffstat (limited to 'board/dhelectronics/dh_stm32mp1/board.c')
-rw-r--r--board/dhelectronics/dh_stm32mp1/board.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index 22af423536d..acfdf2e87c0 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -76,14 +76,25 @@
static bool dh_stm32_mac_is_in_ks8851(void)
{
- ofnode node;
+ struct udevice *udev;
u32 reg, cider, ccr;
+ char path[256];
+ ofnode node;
+ int ret;
node = ofnode_path("ethernet1");
if (!ofnode_valid(node))
return false;
- if (ofnode_device_is_compatible(node, "micrel,ks8851-mll"))
+ ret = ofnode_get_path(node, path, sizeof(path));
+ if (ret)
+ return false;
+
+ ret = uclass_get_device_by_of_path(UCLASS_ETH, path, &udev);
+ if (ret)
+ return false;
+
+ if (!ofnode_device_is_compatible(node, "micrel,ks8851-mll"))
return false;
/*