mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-15 22:42:08 +01:00
xilinx_phy: Pass correct pointer to fdtdec_get_int()
This patch fixes incorrect pointer on offset device in device tree blob. When using with the component "Ethernet 1G/2.5G BASE-X PCS/PMA or SGMII" it does not understand what type is XAE_PHY_TYPE_1000BASE_X and trying to change frequency. Signed-off-by: Kamensky Ivan <kamensky.ivan@mail.ru> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
509d4b9545
commit
1e94629757
@ -101,11 +101,11 @@ static int xilinxphy_startup(struct phy_device *phydev)
|
||||
|
||||
static int xilinxphy_of_init(struct phy_device *phydev)
|
||||
{
|
||||
struct udevice *dev = (struct udevice *)&phydev->dev;
|
||||
u32 phytype;
|
||||
|
||||
debug("%s\n", __func__);
|
||||
phytype = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "phy-type", -1);
|
||||
phytype = fdtdec_get_int(gd->fdt_blob, phydev->dev->of_offset,
|
||||
"phy-type", -1);
|
||||
if (phytype == XAE_PHY_TYPE_1000BASE_X)
|
||||
phydev->flags |= XAE_PHY_TYPE_1000BASE_X;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user