From: Lothar Waßmann Date: Thu, 4 Feb 2016 11:11:38 +0000 (+0100) Subject: net: fec_mxc: make base_mii configurable X-Git-Tag: KARO-TX6-2016-03-10~2^2~12 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=3e554b3f3f5fa51b7d9faf39d17212afb44a6e14 net: fec_mxc: make base_mii configurable --- diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 3d0ffe4f00..bd6169b361 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -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 diff --git a/include/configs/tx6.h b/include/configs/tx6.h index 276e6eff48..e87efb2ad1 100644 --- a/include/configs/tx6.h +++ b/include/configs/tx6.h @@ -281,6 +281,8 @@ #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