[PATCH 3/8] net: mrmac: switch to max-speed property
Padmarao Begari <[email protected]>
| Newsgroups | org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <[email protected]> |
Read the link speed from the standard "max-speed" property instead of the vendor-specific "xlnx,mrmac-rate". Fall back to "xlnx,mrmac-rate" if "max-speed" is not present, and default to 10000 (10G) if neither is set. Signed-off-by: Padmarao Begari <[email protected]> --- drivers/net/xilinx_axi_mrmac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/xilinx_axi_mrmac.c b/drivers/net/xilinx_axi_mrmac.c index d9d4756d14f..8778ab1aaa9 100644 --- a/drivers/net/xilinx_axi_mrmac.c +++ b/drivers/net/xilinx_axi_mrmac.c @@ -547,8 +547,9 @@ static int axi_mrmac_of_to_plat(struct udevice *dev) return -EINVAL; } - /* Set default MRMAC rate to 10000 */ - plat->mrmac_rate = dev_read_u32_default(dev, "xlnx,mrmac-rate", 10000); + if (dev_read_u32(dev, "max-speed", &plat->mrmac_rate)) + /* Set default MRMAC rate to 10000 */ + plat->mrmac_rate = dev_read_u32_default(dev, "xlnx,mrmac-rate", 10000); return 0; } -- 2.34.1