Patchwork [U-Boot,1/2] mx28evk: Convert to PHYLIB

login
register
mail settings
Submitter Fabio Estevam
Date June 7, 2013, 12:04 a.m.
Message ID <1370563459-30270-1-git-send-email-festevam@gmail.com>
Download mbox | patch
Permalink /patch/249558/
State Rejected
Delegated to: Stefano Babic
Headers show

Comments

Fabio Estevam - June 7, 2013, 12:04 a.m.
From: Fabio Estevam <fabio.estevam@freescale.com>

Phylib framework is more appropriate for handling the PHYs, so let's use it
on mx28evk.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx28evk/mx28evk.c | 7 +++++++
 include/configs/mx28evk.h         | 2 ++
 2 files changed, 9 insertions(+)
Fabio Estevam - June 7, 2013, 12:25 a.m.
Hi Stefano,

On Thu, Jun 6, 2013 at 9:04 PM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Phylib framework is more appropriate for handling the PHYs, so let's use it
> on mx28evk.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Please discard this one for now.

I found an issue with this one.
Stefano Babic - June 7, 2013, 7:07 a.m.
On 07/06/2013 02:25, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Thu, Jun 6, 2013 at 9:04 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> Phylib framework is more appropriate for handling the PHYs, so let's use it
>> on mx28evk.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Please discard this one for now.
> 
> I found an issue with this one.
> 

Ok, thanks.

Stefano

Patch

diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index 4edd9f4..fc204fc 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -105,6 +105,13 @@  int board_mmc_init(bd_t *bis)
 #endif
 
 #ifdef	CONFIG_CMD_NET
+int board_phy_config(struct phy_device *phydev)
+{
+	if (phydev->drv->config)
+		phydev->drv->config(phydev);
+
+	return 0;
+}
 
 int board_eth_init(bd_t *bis)
 {
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index de69182..a3e2c0e 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -176,6 +176,8 @@ 
 #define CONFIG_MII
 #define CONFIG_FEC_XCV_TYPE	RMII
 #define CONFIG_MX28_FEC_MAC_IN_OCOTP
+#define CONFIG_PHYLIB
+#define CONFIG_PHY_SMSC
 #endif
 
 /* RTC */