net: mvpp2x: fix phy connected to wrong mdio issue
authorStefan Chulski <stefanc@marvell.com>
Wed, 9 Aug 2017 07:37:44 +0000 (10:37 +0300)
committerStefan Roese <sr@denx.de>
Thu, 10 Aug 2017 06:33:02 +0000 (08:33 +0200)
commit377883f16d360f7edf766ebf4d025db1b7f0fff0
treebe748ce46e88239d375034424aa329ca5e3aaefb
parent4189373a3d7e3604f4b3991cdbfd0ea4c23a3002
net: mvpp2x: fix phy connected to wrong mdio issue

A8K marvell SoC has two South Bridge communication controllers(CP0 and CP1).
Each communication controller has packet processor ports and MDIO.
On MACHIATOBin board ports from CP1 are connected to mdio on CP0.

Issue:
Wrong base address is assigned to MDIO interface during probe.

Fix:
Get MDIO address from PHY handler parent base address.

This should be refined in the future when MDIO driver is implemented.

Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Reviewed-by: Igal Liberman <igall@marvell.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/net/mvpp2.c