net: davinci_mdio: allow to create phys from dt
authorGrygorii Strashko <grygorii.strashko@ti.com>
Wed, 16 Jul 2014 12:13:03 +0000 (15:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jul 2014 06:33:16 +0000 (23:33 -0700)
commit0a0ea068728138641037daa5fce33cb06724285d
treebada37eb1a3bca6993d078ad2d3ea98afe3e4cce
parentf68c9257201ff5d443bf2e815ce01578835674e4
net: davinci_mdio: allow to create phys from dt

This patch allows to create PHYs from DT in case
if they are explicitly defined. The of_mdiobus_register() is
used for such purposes.

For backward compatibility, call  of_mdiobus_register() only in case
if at least one PHY's child is defined in DT, otherwise rollback to
mdiobus_register().

Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/davinci_mdio.c