]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
driver: net: fm: add support for XFI
authorMadalin Bucur <madalin.bucur@oss.nxp.com>
Fri, 11 Sep 2020 07:24:09 +0000 (10:24 +0300)
committerPriyanka Jain <priyanka.jain@nxp.com>
Thu, 24 Sep 2020 15:27:32 +0000 (20:57 +0530)
All the 10G ports that were working in XFI mode were described as
using XGMII (as PHY_INTERFACE_MODE_XFI was not added at the time).
Add the minimal changes required for the FMan code to support XFI.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/net/fm/memac.c

index 0f0f7b0732d0b000b73ac559506e1e99ef38f17b..36f50d27826e596e58cde63a86195380c78e0376 100644 (file)
@@ -98,6 +98,7 @@ static void memac_set_interface_mode(struct fsl_enet_mac *mac,
                if_mode &= ~IF_MODE_MASK;
                if_mode |= (IF_MODE_GMII);
                break;
+       case PHY_INTERFACE_MODE_XFI:
        case PHY_INTERFACE_MODE_XGMII:
                if_mode &= ~IF_MODE_MASK;
                if_mode |= IF_MODE_XGMII;
@@ -106,7 +107,7 @@ static void memac_set_interface_mode(struct fsl_enet_mac *mac,
                break;
        }
        /* Enable automatic speed selection for Non-XGMII */
-       if (type != PHY_INTERFACE_MODE_XGMII)
+       if (type != PHY_INTERFACE_MODE_XGMII && type != PHY_INTERFACE_MODE_XFI)
                if_mode |= IF_MODE_EN_AUTO;
 
        if (type == PHY_INTERFACE_MODE_RGMII ||