]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: use DT more consistently when selecting PHY connection type
authorArseny Solokha <asolokha@kb.kras.ru>
Wed, 4 Sep 2019 13:52:22 +0000 (20:52 +0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Sep 2019 10:28:15 +0000 (12:28 +0200)
commitefdb7e84b4767a9c734b8676a8b4511234ba272e
tree8279c7e08a17543c71b4e86bd142bb2340cf3139
parentc177e3fb3c7898cdc6856e983c368b7f9dc7f26b
gianfar: use DT more consistently when selecting PHY connection type

Historically, gianfar only used phy-connection-type DT property when
connected to PHY in the rgmii-id mode. It ignored the property otherwise,
relying on the connection type auto-detection carried out by MAC and
providing that reconstructed mode to of_phy_connect(). It also did not
consider alternative phy-mode property at all.

Make the driver properly query DT node for PHY connection type first and
use an obtained value if it was specified there. Otherwise, if a particular
DT relies on connection type auto-detection, fall back to reconstructing
the value from MAC registers, as before.

Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c