public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx28evk: Remove fecmxc_mii_postcall()
@ 2012-09-21 20:00 Fabio Estevam
  2012-09-21 21:12 ` Marek Vasut
  2012-09-24  8:46 ` Stefano Babic
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2012-09-21 20:00 UTC (permalink / raw)
  To: u-boot

fecmxc_mii_postcall() is specific to the KSZ9021 PHY on m28evk and
should not be used on mx28evk, which has LAN8270 instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx28evk/mx28evk.c |   25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index d782aea..6e719ff 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -100,19 +100,6 @@ int board_mmc_init(bd_t *bis)
 
 #ifdef	CONFIG_CMD_NET
 
-#define	MII_OPMODE_STRAP_OVERRIDE	0x16
-#define	MII_PHY_CTRL1			0x1e
-#define	MII_PHY_CTRL2			0x1f
-
-int fecmxc_mii_postcall(int phy)
-{
-	miiphy_write("FEC1", phy, MII_BMCR, 0x9000);
-	miiphy_write("FEC1", phy, MII_OPMODE_STRAP_OVERRIDE, 0x0202);
-	if (phy == 3)
-		miiphy_write("FEC1", 3, MII_PHY_CTRL2, 0x8180);
-	return 0;
-}
-
 int board_eth_init(bd_t *bis)
 {
 	struct mxs_clkctrl_regs *clkctrl_regs =
@@ -152,24 +139,12 @@ int board_eth_init(bd_t *bis)
 		return -EINVAL;
 	}
 
-	ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
-	if (ret) {
-		puts("FEC MXS: Unable to register FEC0 mii postcall\n");
-		return ret;
-	}
-
 	dev = eth_get_dev_by_name("FEC1");
 	if (!dev) {
 		puts("FEC MXS: Unable to get FEC1 device entry\n");
 		return -EINVAL;
 	}
 
-	ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
-	if (ret) {
-		puts("FEC MXS: Unable to register FEC1 mii postcall\n");
-		return ret;
-	}
-
 	return ret;
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] mx28evk: Remove fecmxc_mii_postcall()
  2012-09-21 20:00 [U-Boot] [PATCH] mx28evk: Remove fecmxc_mii_postcall() Fabio Estevam
@ 2012-09-21 21:12 ` Marek Vasut
  2012-09-24  8:46 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2012-09-21 21:12 UTC (permalink / raw)
  To: u-boot

Dear Fabio Estevam,

> fecmxc_mii_postcall() is specific to the KSZ9021 PHY on m28evk and
> should not be used on mx28evk, which has LAN8270 instead.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Marek Vasut <marex@denx.de>

This is a fix, so should go into current release.

> ---
>  board/freescale/mx28evk/mx28evk.c |   25 -------------------------
>  1 file changed, 25 deletions(-)
> 
> diff --git a/board/freescale/mx28evk/mx28evk.c
> b/board/freescale/mx28evk/mx28evk.c index d782aea..6e719ff 100644
> --- a/board/freescale/mx28evk/mx28evk.c
> +++ b/board/freescale/mx28evk/mx28evk.c
> @@ -100,19 +100,6 @@ int board_mmc_init(bd_t *bis)
> 
>  #ifdef	CONFIG_CMD_NET
> 
> -#define	MII_OPMODE_STRAP_OVERRIDE	0x16
> -#define	MII_PHY_CTRL1			0x1e
> -#define	MII_PHY_CTRL2			0x1f
> -
> -int fecmxc_mii_postcall(int phy)
> -{
> -	miiphy_write("FEC1", phy, MII_BMCR, 0x9000);
> -	miiphy_write("FEC1", phy, MII_OPMODE_STRAP_OVERRIDE, 0x0202);
> -	if (phy == 3)
> -		miiphy_write("FEC1", 3, MII_PHY_CTRL2, 0x8180);
> -	return 0;
> -}
> -
>  int board_eth_init(bd_t *bis)
>  {
>  	struct mxs_clkctrl_regs *clkctrl_regs =
> @@ -152,24 +139,12 @@ int board_eth_init(bd_t *bis)
>  		return -EINVAL;
>  	}
> 
> -	ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
> -	if (ret) {
> -		puts("FEC MXS: Unable to register FEC0 mii postcall\n");
> -		return ret;
> -	}
> -
>  	dev = eth_get_dev_by_name("FEC1");
>  	if (!dev) {
>  		puts("FEC MXS: Unable to get FEC1 device entry\n");
>  		return -EINVAL;
>  	}
> 
> -	ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
> -	if (ret) {
> -		puts("FEC MXS: Unable to register FEC1 mii postcall\n");
> -		return ret;
> -	}
> -
>  	return ret;
>  }

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] mx28evk: Remove fecmxc_mii_postcall()
  2012-09-21 20:00 [U-Boot] [PATCH] mx28evk: Remove fecmxc_mii_postcall() Fabio Estevam
  2012-09-21 21:12 ` Marek Vasut
@ 2012-09-24  8:46 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2012-09-24  8:46 UTC (permalink / raw)
  To: u-boot

On 21/09/2012 22:00, Fabio Estevam wrote:
> fecmxc_mii_postcall() is specific to the KSZ9021 PHY on m28evk and
> should not be used on mx28evk, which has LAN8270 instead.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx (fix), thanks.

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-24  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21 20:00 [U-Boot] [PATCH] mx28evk: Remove fecmxc_mii_postcall() Fabio Estevam
2012-09-21 21:12 ` Marek Vasut
2012-09-24  8:46 ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox