]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: enable automatic phy discovery
authorJeremy Linton <jeremy.linton@arm.com>
Mon, 24 Feb 2020 22:54:00 +0000 (16:54 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 23:31:23 +0000 (15:31 -0800)
commit3d0690cd51ba57dda44acd1c1d400b703e485d0d
tree3c80d48ec0e3ff4e4587ee9f973c725f2acf29a9
parent25b7c5f7cbd454ec571e158840d3729b0b5d8c23
net: bcmgenet: enable automatic phy discovery

The unimac mdio driver falls back to scanning the
entire bus if its given an appropriate mask. In ACPI
mode we expect that the system is well behaved and
conforms to recent versions of the specification.

We then utilize phy_find_first(), and
phy_connect_direct() to find and attach to the
discovered phy during net_device open. While its
apparently possible to build a genet based device
with multiple phys on a single mdio bus, this works
for current machines. Further, this driver makes
a number of assumptions about the platform device,
mac, mdio and phy all being 1:1. Lastly, It also
avoids having to create references across the ACPI
namespace hierarchy.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmmii.c