From 3e554b3f3f5fa51b7d9faf39d17212afb44a6e14 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Thu, 4 Feb 2016 12:11:38 +0100 Subject: [PATCH] net: fec_mxc: make base_mii configurable --- drivers/net/fec_mxc.c | 4 +++- include/configs/tx6.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.2