treewide: mem: Enable MEMTEST via defconfig
[oweals/u-boot.git] / drivers / net / fec_mxc.c
index 2aa1029d423c5d3785f9e42361a642e2ff4a761a..345d37be4e825ddde165b033c47142a499b8e592 100644 (file)
@@ -503,6 +503,16 @@ static int fec_open(struct eth_device *edev)
        writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_ETHER_EN,
               &fec->eth->ecntrl);
 
+#ifdef FEC_ENET_ENABLE_TXC_DELAY
+       writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_TXC_DLY,
+              &fec->eth->ecntrl);
+#endif
+
+#ifdef FEC_ENET_ENABLE_RXC_DELAY
+       writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_RXC_DLY,
+              &fec->eth->ecntrl);
+#endif
+
 #if defined(CONFIG_MX25) || defined(CONFIG_MX53) || defined(CONFIG_MX6SL)
        udelay(100);
 
@@ -1309,7 +1319,7 @@ static int fec_phy_init(struct fec_priv *priv, struct udevice *dev)
        return 0;
 }
 
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
 /* FEC GPIO reset */
 static void fec_gpio_reset(struct fec_priv *priv)
 {
@@ -1402,7 +1412,7 @@ static int fecmxc_probe(struct udevice *dev)
        }
 #endif
 
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
        fec_gpio_reset(priv);
 #endif
        /* Reset chip. */
@@ -1508,7 +1518,7 @@ static int fecmxc_ofdata_to_platdata(struct udevice *dev)
        device_get_supply_regulator(dev, "phy-supply", &priv->phy_supply);
 #endif
 
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
        ret = gpio_request_by_name(dev, "phy-reset-gpios", 0,
                                   &priv->phy_reset_gpio, GPIOD_IS_OUT);
        if (ret < 0)