phy: micrel: Fix finding PHY properties in MAC node.
phy: micrel: Fix finding PHY properties in MAC node.

commit 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus,
not the bus' parent.")  changed the parenting of PHY devices, making
them a child of the MDIO bus, instead of the MAC device. This broken
the Micrel PHY driver which has a deprecated feature of allowing PHY
properties to be placed into the MAC node.

In order to find the MAC node, we need to walk up the tree of devices
until we find one with an OF node attached.

Reported-by: Dinh Nguyen <a48724738fc762a7f206428dfcaf7ede2fd84d0f@opensource.altera.com>
Suggested-by: David Daney <eec15f2dea0e7d114bf41a5bde8a2858b8f3e893@cavium.com>
Acked-by: David Daney <eec15f2dea0e7d114bf41a5bde8a2858b8f3e893@cavium.com>
Fixes: 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus, not the bus' parent.")
Signed-off-by: Andrew Lunn <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@lunn.ch>
Tested-by: Dinh Nguyen <a48724738fc762a7f206428dfcaf7ede2fd84d0f@opensource.altera.com>
Acked-by: Florian Fainelli <59190c1867e3222b932a0de3c668eb2d980d69a2@gmail.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs