[v3] mx6slevk: Convert to DM_ETH
diff mbox series

Message ID 20200213122532.24995-1-jardim.c.pedro@gmail.com
State New
Delegated to: Stefano Babic
Headers show
Series
  • [v3] mx6slevk: Convert to DM_ETH
Related show

Commit Message

Pedro Jardim Feb. 13, 2020, 12:25 p.m. UTC
This fixes the following warning:

===================== WARNING ======================
This board does not use CONFIG_DM_ETH (Driver Model
for Ethernet drivers). Please update the board to use
CONFIG_DM_ETH before the v2020.07 release. Failure to
update by the deadline may result in board removal.
See doc/driver-model/migration.rst for more info.
====================================================

Signed-off-by: Pedro Jardim <jardim.c.pedro@gmail.com>
---
Changes since v1"
- Remove CONFIG_ETHPRIME
Changes since v2"
- Reposition the "Changes since v1" section
 board/freescale/mx6slevk/mx6slevk.c | 31 -----------------------------
 configs/mx6slevk_defconfig          |  3 +++
 include/configs/mx6slevk.h          |  6 ------
 3 files changed, 3 insertions(+), 37 deletions(-)

Comments

Fabio Estevam Feb. 13, 2020, 1:33 p.m. UTC | #1
On Thu, Feb 13, 2020 at 9:24 AM Pedro Jardim <jardim.c.pedro@gmail.com> wrote:
>
> This fixes the following warning:
>
> ===================== WARNING ======================
> This board does not use CONFIG_DM_ETH (Driver Model
> for Ethernet drivers). Please update the board to use
> CONFIG_DM_ETH before the v2020.07 release. Failure to
> update by the deadline may result in board removal.
> See doc/driver-model/migration.rst for more info.
> ====================================================
>
> Signed-off-by: Pedro Jardim <jardim.c.pedro@gmail.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

Patch
diff mbox series

diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index 453f281418..43029e4245 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -21,7 +21,6 @@ 
 #include <fsl_esdhc_imx.h>
 #include <i2c.h>
 #include <mmc.h>
-#include <netdev.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include "../common/pfuze.h"
@@ -102,35 +101,11 @@  static iomux_v3_cfg_t const usdhc3_pads[] = {
 };
 #endif
 
-static iomux_v3_cfg_t const fec_pads[] = {
-	MX6_PAD_FEC_MDC__FEC_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_FEC_MDIO__FEC_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_FEC_CRS_DV__FEC_RX_DV | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_FEC_RXD0__FEC_RX_DATA0 | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_FEC_RXD1__FEC_RX_DATA1 | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_FEC_TX_EN__FEC_TX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_FEC_TXD0__FEC_TX_DATA0 | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_FEC_TXD1__FEC_TX_DATA1 | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_FEC_REF_CLK__FEC_REF_OUT | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_FEC_RX_ER__GPIO_4_19 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_FEC_TX_CLK__GPIO_4_21 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
 static void setup_iomux_uart(void)
 {
 	imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
 }
 
-static void setup_iomux_fec(void)
-{
-	imx_iomux_v3_setup_multiple_pads(fec_pads, ARRAY_SIZE(fec_pads));
-
-	/* Power up LAN8720 PHY */
-	gpio_request(ETH_PHY_POWER, "eth_pwr");
-	gpio_direction_output(ETH_PHY_POWER , 1);
-	udelay(15000);
-}
-
 int board_mmc_get_env_dev(int devno)
 {
 	return devno;
@@ -179,12 +154,6 @@  int power_init_board(void)
 #endif
 
 #ifdef CONFIG_FEC_MXC
-int board_eth_init(bd_t *bis)
-{
-	setup_iomux_fec();
-
-	return cpu_eth_init(bis);
-}
 
 static int setup_fec(void)
 {
diff --git a/configs/mx6slevk_defconfig b/configs/mx6slevk_defconfig
index dc22e830a3..163cb1a7ae 100644
--- a/configs/mx6slevk_defconfig
+++ b/configs/mx6slevk_defconfig
@@ -61,3 +61,6 @@  CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
+CONFIG_DM_ETH=y
+CONFIG_FEC_MXC=y
+CONFIG_PHY_SMSC=y
diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h
index 6b2a174e7a..71d72d8c74 100644
--- a/include/configs/mx6slevk.h
+++ b/include/configs/mx6slevk.h
@@ -32,12 +32,7 @@ 
 #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
 #define CONFIG_SYS_I2C_SPEED		  100000
 
-#define CONFIG_FEC_MXC
-#define IMX_FEC_BASE			ENET_BASE_ADDR
-#define CONFIG_FEC_XCV_TYPE		RMII
-#define CONFIG_FEC_MXC_PHYADDR		0
-
-#define CONFIG_PHY_SMSC
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"script=boot.scr\0" \
-- 
2.17.1