From: Jagan Teki Date: Mon, 30 Jul 2018 18:15:03 +0530 Subject: [U-Boot] [PATCH 04/10] net: fec: Add default CONFIG_FEC_MXC_PHYADDR for few boards In-Reply-To: <20180730124509.13063-1-jagan@amarulasolutions.com> References: <20180730124509.13063-1-jagan@amarulasolutions.com> Message-ID: <20180730124509.13063-5-jagan@amarulasolutions.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Usually PHYADDR is used while PHYLIB is defined, but boards like apx4devkit, mx6qarm2 are not using PHYLIB but they are using CONFIG_FEC_MXC_PHYADDR. So, future patches will convert CONFIG_FEC_MXC_PHYADDR to generic CONFIG_PHY_ADDR and that will depends on PHYLIB. Handle this special case for this boards by adding default CONFIG_FEC_MXC_PHYADDR to 0 if not defined so-that it can't depends on PHYLIB local to fec_mxc. Boards which are using PHY_ADDR in future will anyway use PHYLIB. Cc: Ye Li Cc: Jason Liu Cc: Lauri Hintsala Signed-off-by: Jagan Teki --- drivers/net/fec_mxc.c | 4 ++++ include/configs/apx4devkit.h | 1 - include/configs/mx6qarm2.h | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index fc42978a20..49bb926efa 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -50,6 +50,10 @@ DECLARE_GLOBAL_DATA_PTR; #define CONFIG_FEC_XCV_TYPE PHY_INTERFACE_MODE_MII100 #endif +#if defined(CONFIG_TARGET_APX4DEVKIT) || defined(CONFIG_TARGET_MX6QARM2) +# define CONFIG_FEC_MXC_PHY_ADDR 0 +#endif + /* * The i.MX28 operates with packets in big endian. We need to swap them before * sending and after receiving. diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h index 475f9c372f..aa129edc89 100644 --- a/include/configs/apx4devkit.h +++ b/include/configs/apx4devkit.h @@ -52,7 +52,6 @@ /* FEC Ethernet on SoC */ #ifdef CONFIG_CMD_NET #define CONFIG_ETHPRIME "FEC" -#define CONFIG_FEC_MXC_PHYADDR 0 #define IMX_FEC_BASE MXS_ENET0_BASE #endif diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h index b82b8325ff..06043c888f 100644 --- a/include/configs/mx6qarm2.h +++ b/include/configs/mx6qarm2.h @@ -22,7 +22,6 @@ #define IMX_FEC_BASE ENET_BASE_ADDR #define CONFIG_FEC_XCV_TYPE PHY_INTERFACE_MODE_RGMII -#define CONFIG_FEC_MXC_PHYADDR 0 #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ -- 2.18.0.321.gffc6fa0e3