drivers: net: cpsw: add support to update phy address
authorSekhar Nori <nsekhar@ti.com>
Thu, 23 Aug 2018 11:41:29 +0000 (17:11 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 26 Sep 2018 01:49:18 +0000 (21:49 -0400)
commite2597be5bcb90030fdc116e7c5810bdef7fd9e0d
tree49241dfbf58ea2528fd4f34e7b2f7ebed098d3f2
parent4495680735a471cdee18ee45afd13ea9107bca44
drivers: net: cpsw: add support to update phy address

On some boards using TI CPSW, it may be possible that
PHY address was not latched correctly, and the actual
address that the phy responds on is different from that
set in device-tree. For example, see this problem report
on beaglebone black:

https://groups.google.com/d/msg/beagleboard/9mctrG26Mc8/1FuI_i5KW10J

Add support to check for this condition and use the
detected phy address when its safe to do so.

Also, add a public API that exposes the phy address of
a given slave. This can be used to update device-tree that
is passed to Linux kernel.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
drivers/net/cpsw.c
include/cpsw.h