[13/37] net: fec_mxc: support i.MX8ULP

Message ID 20210412121306.11484-14-peng.fan@oss.nxp.com
State Superseded
Headers show
Series
  • imx: add i.MX8ULP support
Related show

Commit Message

Peng Fan (OSS) April 12, 2021, 12:12 p.m.
From: Peng Fan <peng.fan@nxp.com>


Support i.MX8ULP in fec_mxc

Signed-off-by: Peng Fan <peng.fan@nxp.com>

---
 drivers/net/Kconfig   | 2 +-
 drivers/net/fec_mxc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.30.0

Comments

Ramon Fried April 15, 2021, 1:42 a.m. | #1
On Mon, Apr 12, 2021 at 2:53 PM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>

> From: Peng Fan <peng.fan@nxp.com>

>

> Support i.MX8ULP in fec_mxc

>

> Signed-off-by: Peng Fan <peng.fan@nxp.com>

> ---

>  drivers/net/Kconfig   | 2 +-

>  drivers/net/fec_mxc.c | 2 +-

>  2 files changed, 2 insertions(+), 2 deletions(-)

>

> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig

> index cf062fad4d..a443b499ba 100644

> --- a/drivers/net/Kconfig

> +++ b/drivers/net/Kconfig

> @@ -314,7 +314,7 @@ config FEC_MXC_MDIO_BASE

>

>  config FEC_MXC

>         bool "FEC Ethernet controller"

> -       depends on MX28 || MX5 || MX6 || MX7 || IMX8 || IMX8M || VF610

> +       depends on MX28 || MX5 || MX6 || MX7 || IMX8 || IMX8M || IMX8ULP || VF610

>         help

>           This driver supports the 10/100 Fast Ethernet controller for

>           NXP i.MX processors.

> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c

> index ec21157d71..57ba856915 100644

> --- a/drivers/net/fec_mxc.c

> +++ b/drivers/net/fec_mxc.c

> @@ -628,7 +628,7 @@ static int fec_init(struct eth_device *dev, struct bd_info *bd)

>         writel(0x00000000, &fec->eth->gaddr2);

>

>         /* Do not access reserved register */

> -       if (!is_mx6ul() && !is_mx6ull() && !is_imx8() && !is_imx8m()) {

> +       if (!is_mx6ul() && !is_mx6ull() && !is_imx8() && !is_imx8m() && !is_imx8ulp()) {

>                 /* clear MIB RAM */

>                 for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)

>                         writel(0, i);

> --

> 2.30.0

>

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

Patch

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index cf062fad4d..a443b499ba 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -314,7 +314,7 @@  config FEC_MXC_MDIO_BASE
 
 config FEC_MXC
 	bool "FEC Ethernet controller"
-	depends on MX28 || MX5 || MX6 || MX7 || IMX8 || IMX8M || VF610
+	depends on MX28 || MX5 || MX6 || MX7 || IMX8 || IMX8M || IMX8ULP || VF610
 	help
 	  This driver supports the 10/100 Fast Ethernet controller for
 	  NXP i.MX processors.
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index ec21157d71..57ba856915 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -628,7 +628,7 @@  static int fec_init(struct eth_device *dev, struct bd_info *bd)
 	writel(0x00000000, &fec->eth->gaddr2);
 
 	/* Do not access reserved register */
-	if (!is_mx6ul() && !is_mx6ull() && !is_imx8() && !is_imx8m()) {
+	if (!is_mx6ul() && !is_mx6ull() && !is_imx8() && !is_imx8m() && !is_imx8ulp()) {
 		/* clear MIB RAM */
 		for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
 			writel(0, i);