diff options
author | Prabhakar Kushwaha <prabhakar@freescale.com> | 2015-11-04 12:25:52 +0530 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2015-11-30 08:53:02 -0800 |
commit | 99e904c1f036145946a8439e3f3c5180139640a6 (patch) | |
tree | 58a46cc598038ecf7b1f51789f2810af447fc4f3 /drivers | |
parent | a1399534f103883908a3a826c9f0505b92b0c75e (diff) | |
download | u-boot-imx-99e904c1f036145946a8439e3f3c5180139640a6.zip u-boot-imx-99e904c1f036145946a8439e3f3c5180139640a6.tar.gz u-boot-imx-99e904c1f036145946a8439e3f3c5180139640a6.tar.bz2 |
armv8: lsch3: Fix lane protocol parsing logic
Current implementation only consider SGMIIs for dpmac initialization.
XFI serdes protocols also uses dpmac.
Also, fix lane protocol parsing logic to consider both XFIs and SGMIIs.
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ldpaa_eth/ldpaa_wriop.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/ldpaa_eth/ldpaa_wriop.c b/drivers/net/ldpaa_eth/ldpaa_wriop.c index 926057a..c38243a 100644 --- a/drivers/net/ldpaa_eth/ldpaa_wriop.c +++ b/drivers/net/ldpaa_eth/ldpaa_wriop.c @@ -23,17 +23,16 @@ __weak phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtc) void wriop_init_dpmac(int sd, int dpmac_id, int lane_prtcl) { phy_interface_t enet_if; - int index = dpmac_id + sd * 8; - dpmac_info[index].enabled = 0; - dpmac_info[index].id = 0; - dpmac_info[index].enet_if = PHY_INTERFACE_MODE_NONE; + dpmac_info[dpmac_id].enabled = 0; + dpmac_info[dpmac_id].id = 0; + dpmac_info[dpmac_id].enet_if = PHY_INTERFACE_MODE_NONE; - enet_if = wriop_dpmac_enet_if(index, lane_prtcl); + enet_if = wriop_dpmac_enet_if(dpmac_id, lane_prtcl); if (enet_if != PHY_INTERFACE_MODE_NONE) { - dpmac_info[index].enabled = 1; - dpmac_info[index].id = index; - dpmac_info[index].enet_if = enet_if; + dpmac_info[dpmac_id].enabled = 1; + dpmac_info[dpmac_id].id = dpmac_id; + dpmac_info[dpmac_id].enet_if = enet_if; } } |