diff options
author | Tom Rini <trini@konsulko.com> | 2022-02-17 11:03:50 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-02-17 11:03:50 -0500 |
commit | 8ad1c9c26f7740806a162818b790d4a72f515b7e (patch) | |
tree | c330b8a446148b86d530de7f688b4fc910beeda8 /board | |
parent | b6277189398a166011ce46a63665423a20de0809 (diff) | |
parent | 4b7db75616712606fd6b61a13df38326e41b3301 (diff) | |
download | u-boot-8ad1c9c26f7740806a162818b790d4a72f515b7e.zip u-boot-8ad1c9c26f7740806a162818b790d4a72f515b7e.tar.gz u-boot-8ad1c9c26f7740806a162818b790d4a72f515b7e.tar.bz2 |
Merge https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/17Feb2022
- a37xx: pci: Cleanup and minor fix for root port check (Pali)
- pci: mvebu: Ensure that root port is always on root zero bus (Pali)
- kwbimage: Fix dumping DATA registers for v0 images (Pali)
- kwbimage: Support for parsing extended v0 format (Pali)
- a37xx: Fix code and update DTS files to upstream version (Pali)
- a37xx: Fix and extend building memory map (Pali)
- ddr: marvell: a38x: fix BYTE_HOMOGENEOUS_SPLIT_OUT decision (Marek)
- mvebu: Optionally reset board on DDR training failure (Marek)
Diffstat (limited to 'board')
-rw-r--r-- | board/CZ.NIC/turris_mox/turris_mox.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index f0c5aa6..8888a2d 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -375,8 +375,22 @@ static void mox_phy_leds_start_blinking(void) { struct phy_device *phydev; struct mii_dev *bus; + const char *node_name; + int node; + + node = fdt_path_offset(gd->fdt_blob, "ethernet0"); + if (node < 0) { + printf("Cannot get eth0!\n"); + return; + } - bus = miiphy_get_dev_by_name("neta@30000"); + node_name = fdt_get_name(gd->fdt_blob, node, NULL); + if (!node_name) { + printf("Cannot get eth0 node name!\n"); + return; + } + + bus = miiphy_get_dev_by_name(node_name); if (!bus) { printf("Cannot get MDIO bus device!\n"); return; @@ -623,8 +637,12 @@ int last_stage_init(void) */ if (peridot || topaz) { struct mii_dev *bus; + const char *node_name; + int node; - bus = miiphy_get_dev_by_name("neta@30000"); + node = fdt_path_offset(gd->fdt_blob, "ethernet0"); + node_name = (node >= 0) ? fdt_get_name(gd->fdt_blob, node, NULL) : NULL; + bus = node_name ? miiphy_get_dev_by_name(node_name) : NULL; if (!bus) { printf("Cannot get MDIO bus device!\n"); } else { |