summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKamensky Ivan <kamensky.ivan@mail.ru>2016-12-27 19:12:23 +0300
committerMichal Simek <michal.simek@xilinx.com>2017-01-11 07:00:27 +0100
commit1e946297575b320e6f6ab8a33467df17d8e38923 (patch)
treeabce596e9644b4d4c00bf985befd947670480ee0 /drivers
parent509d4b9545d82179d5854eddb928c0055702dc67 (diff)
downloadu-boot-imx-1e946297575b320e6f6ab8a33467df17d8e38923.zip
u-boot-imx-1e946297575b320e6f6ab8a33467df17d8e38923.tar.gz
u-boot-imx-1e946297575b320e6f6ab8a33467df17d8e38923.tar.bz2
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/xilinx_phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
index f3eaf2e..920bfcb 100644
--- a/drivers/net/phy/xilinx_phy.c
+++ b/drivers/net/phy/xilinx_phy.c
@@ -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;