diff mbox series

[U-Boot,5/6] driver: net: fsl-mc: initialize dpmac irrespective of phy

Message ID 20180713144036.17606-6-pankaj.bansal@nxp.com
State Superseded
Delegated to: Joe Hershberger
Headers show
Series driver: net: fsl-mc: Add support of multiple phys for dpmac | expand

Commit Message

Pankaj Bansal July 13, 2018, 2:40 p.m. UTC
The dpmac initalization should not depend on phy.
As the phy is not necessary to be present for dpmac to function.
Therefore, remove dpmac initialization dependency from phy.

Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
---
 drivers/net/fsl-mc/mc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Joe Hershberger July 25, 2018, 8:14 p.m. UTC | #1
On Fri, Jul 13, 2018 at 9:40 AM, Pankaj Bansal <pankaj.bansal@nxp.com> wrote:
> The dpmac initalization should not depend on phy.
> As the phy is not necessary to be present for dpmac to function.
> Therefore, remove dpmac initialization dependency from phy.
>
> Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
diff mbox series

Patch

diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 982024e31e..e2341a2e3c 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -327,8 +327,7 @@  static int mc_fixup_mac_addrs(void *blob, enum mc_fixup_type type)
 
 	for (i = WRIOP1_DPMAC1; i < NUM_WRIOP_PORTS; i++) {
 		/* port not enabled */
-		if ((wriop_is_enabled_dpmac(i) != 1) ||
-		    (wriop_get_phy_address(i) == -1))
+		if (wriop_is_enabled_dpmac(i) != 1)
 			continue;
 
 		sprintf(ethname, "DPMAC%d@%s", i,
@@ -845,8 +844,7 @@  int fsl_mc_ldpaa_init(bd_t *bis)
 	int i;
 
 	for (i = WRIOP1_DPMAC1; i < NUM_WRIOP_PORTS; i++)
-		if ((wriop_is_enabled_dpmac(i) == 1) &&
-		    (wriop_get_phy_address(i) != -1))
+		if (wriop_is_enabled_dpmac(i) == 1)
 			ldpaa_eth_init(i, wriop_get_enet_if(i));
 	return 0;
 }