From: Tom Rini Date: Thu, 9 Feb 2017 16:56:35 +0000 (-0500) Subject: Merge branch 'master' of git://git.denx.de/u-boot-net X-Git-Tag: v2017.03-rc2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e1a71f8b339220fa74c9cd5d36ae9c444c492e83;p=u-boot Merge branch 'master' of git://git.denx.de/u-boot-net --- e1a71f8b339220fa74c9cd5d36ae9c444c492e83 diff --cc drivers/net/macb.c index 452fc3e3b9,67d820fefa..1c4bef97b6 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@@ -995,12 -1030,10 +1030,11 @@@ static int macb_eth_probe(struct udevic { struct eth_pdata *pdata = dev_get_platdata(dev); struct macb_device *macb = dev_get_priv(dev); - - #ifdef CONFIG_DM_ETH const char *phy_mode; + int ret; - phy_mode = fdt_getprop(gd->fdt_blob, dev->of_offset, "phy-mode", NULL); + phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode", + NULL); if (phy_mode) macb->phy_interface = phy_get_interface_by_name(phy_mode); if (macb->phy_interface == -1) { diff --cc drivers/net/phy/ti.c index d1ce4060ff,2fd566cfa6..1d870806a3 --- a/drivers/net/phy/ti.c +++ b/drivers/net/phy/ti.c @@@ -166,14 -174,23 +174,23 @@@ static int dp83867_of_init(struct phy_d { struct dp83867_private *dp83867 = phydev->priv; struct udevice *dev = phydev->dev; + int node = dev->of_offset; + const void *fdt = gd->fdt_blob; + + if (fdtdec_get_bool(fdt, node, "ti,max-output-impedance")) + dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX; + else if (fdtdec_get_bool(fdt, node, "ti,min-output-impedance")) + dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN; + else + dp83867->io_impedance = -EINVAL; - dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev->of_offset, + dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), "ti,rx-internal-delay", -1); - dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev->of_offset, + dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), "ti,tx-internal-delay", -1); - dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob, dev->of_offset, + dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), "ti,fifo-depth", -1); return 0;