net: fec_mxc: make base_mii configurable
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 4 Feb 2016 11:11:38 +0000 (12:11 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 4 Feb 2016 11:11:38 +0000 (12:11 +0100)
drivers/net/fec_mxc.c
include/configs/tx6.h

index 3d0ffe4..bd6169b 100644 (file)
@@ -1091,12 +1091,14 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)
 #endif
        int ret;
 
-#ifdef CONFIG_SOC_MX28
+#if defined(CONFIG_SOC_MX28)
        /*
         * The i.MX28 has two ethernet interfaces, but they are not equal.
         * Only the first one can access the MDIO bus.
         */
        base_mii = MXS_ENET0_BASE;
+#elif defined(FEC_MDIO_BASE_ADDR)
+       base_mii = FEC_MDIO_BASE_ADDR;
 #else
        base_mii = addr;
 #endif
index 276e6ef..e87efb2 100644 (file)
 #ifndef CONFIG_SOC_MX6UL
 #define CONFIG_FEC_MXC_PHYADDR         0
 #define IMX_FEC_BASE                   ENET_BASE_ADDR
+#else
+#define FEC_MDIO_BASE_ADDR             ENET_BASE_ADDR
 #endif
 #define CONFIG_FEC_XCV_TYPE            RMII
 #endif