]> git.sur5r.net Git - u-boot/commitdiff
net/fm: Enable FMAN ports if l2switch ports are connected over SGMII
authorCodrin Ciubotariu <codrin.ciubotariu@freescale.com>
Mon, 12 Jan 2015 12:08:32 +0000 (14:08 +0200)
committerYork Sun <yorksun@freescale.com>
Fri, 16 Jan 2015 17:32:32 +0000 (09:32 -0800)
If SerDes is configured to connect L2 Switch ports from T1040
over SGMII or QSGMII, the two FMAN fixed ports (FM1@DTSEC1 and FM2@DTSEC2)
that are connected to two L2 swtch ports must be enabled. These
ports don't have PHYs and must be treated accordingly.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
drivers/net/fm/t1040.c

index d2a097e0e55d0facd9ed1e1e290f27cc60a4cb09..04583661eceb496920999920e7d4de7ed30e40b4 100644 (file)
@@ -50,7 +50,8 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        switch (port) {
        case FM1_DTSEC1:
        case FM1_DTSEC2:
-               if (is_serdes_configured(QSGMII_SW1_A + port - FM1_DTSEC1))
+               if (is_serdes_configured(QSGMII_SW1_A + port - FM1_DTSEC1) ||
+                   is_serdes_configured(SGMII_SW1_MAC1  + port - FM1_DTSEC1))
                        return PHY_INTERFACE_MODE_QSGMII;
        case FM1_DTSEC3:
        case FM1_DTSEC4: