summaryrefslogtreecommitdiff
path: root/drivers/net/zynq_gem.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-09-24 08:33:47 -0400
committerTom Rini <trini@konsulko.com>2020-09-24 08:33:47 -0400
commit67ece26d8b5d4bfa4fda8c456261c465d0815d7d (patch)
tree58d6f1e224c68b9b7b710f63087cb4468394aba7 /drivers/net/zynq_gem.c
parente119de72e3ae3accf831b5541d83d5c2faf031ff (diff)
parent4ab3817ff16a154981f9394a2c4a0f8f6a72713b (diff)
Merge tag 'xilinx-for-v2021.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next
Xilinx changes for v2021.01 arm64: - Support for bigger U-Boot images compiled with PIE microblaze: - Extend support for LE/BE systems zynqmp: - Refactor silicon ID detection code with using firmware interface - Add support for saving variables based on bootmode zynqmp-r5: - Fix MPU mapping and defconfig setting. xilinx: - Minor driver changes: names alignment - Enable UBIFS - Minor DT and macros fixes - Fix boot with appended DT - Fix distro boot cmd: - pxe: Add fixing for platforms with manual relocation support clk: - fixed_rate: Add DM flag to support early boot on r5 fpga: - zynqmppl: Use only firmware interface and enable SPL build serial: - uartlite: Enable for ARM systems and support endians mmc: - zynq: Fix indentation net: - gem: Support for multiple phys - emac: Fix 64bit support and enable it for arm64 kconfig: - Setup default values for Xilinx platforms - Fix dependecies for Xilinx drivers - Source board Kconfig only when platform is enabled - Fix FPGA Kconfig entry with SPL - Change some defconfig values bindings: - Add binding doc for vsc8531
Diffstat (limited to 'drivers/net/zynq_gem.c')
-rw-r--r--drivers/net/zynq_gem.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index da4b6fba9ff..8afec8bbfcf 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -758,6 +758,9 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
if (!dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0,
&phandle_args)) {
+ fdt_addr_t addr;
+ ofnode parent;
+
debug("phy-handle does exist %s\n", dev->name);
priv->phyaddr = ofnode_read_u32_default(phandle_args.node,
"reg", -1);
@@ -765,6 +768,13 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
priv->max_speed = ofnode_read_u32_default(phandle_args.node,
"max-speed",
SPEED_1000);
+
+ parent = ofnode_get_parent(phandle_args.node);
+ addr = ofnode_get_addr(parent);
+ if (addr != FDT_ADDR_T_NONE) {
+ debug("MDIO bus not found %s\n", dev->name);
+ priv->mdiobase = (struct zynq_gem_regs *)addr;
+ }
}
phy_mode = dev_read_prop(dev, "phy-mode", NULL);