Patchwork [U-Boot,1/2] net: fec_mxc: Add support for mx6 solo-lite

login
register
mail settings
Submitter Fabio Estevam
Date Sept. 12, 2013, 10:41 p.m.
Message ID <1379025678-28992-1-git-send-email-festevam@gmail.com>
Download mbox | patch
Permalink /patch/274616/
State Changes Requested
Delegated to: Stefano Babic
Headers show

Comments

Fabio Estevam - Sept. 12, 2013, 10:41 p.m.
From: Fabio Estevam <fabio.estevam@freescale.com>

Similarly as mx25 and mx53, mx6solo-lite needs to setup the MII gasket for RMII
mode.

Add support for mx6solo-lite.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Based on FSL BSP, which uses U-boot 2013.04.

 drivers/net/fec_mxc.c | 2 +-
 drivers/net/fec_mxc.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Otavio Salvador - Sept. 13, 2013, 3:16 a.m.
On Thu, Sep 12, 2013 at 7:41 PM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Similarly as mx25 and mx53, mx6solo-lite needs to setup the MII gasket for RMII
> mode.
>
> Add support for mx6solo-lite.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Seems safe enough to go into 2013.10, doesn't it? :-)
Stefano Babic - Sept. 13, 2013, 8:32 a.m.
On 13/09/2013 05:16, Otavio Salvador wrote:
> On Thu, Sep 12, 2013 at 7:41 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> Similarly as mx25 and mx53, mx6solo-lite needs to setup the MII gasket for RMII
>> mode.
>>
>> Add support for mx6solo-lite.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>> ---
> 
> Seems safe enough to go into 2013.10, doesn't it? :-)
> 

Agree - I will merge it and push it.

Regards,
Stefano
Stefano Babic - Sept. 20, 2013, 4:07 p.m.
On 13/09/2013 00:41, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Similarly as mx25 and mx53, mx6solo-lite needs to setup the MII gasket for RMII
> mode.
> 
> Add support for mx6solo-lite.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---


Applied to u-boot-imx, thanks!

Best regards,
Stefano Babic

Patch

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index e14a359..f4a0c5d 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -453,7 +453,7 @@  static int fec_open(struct eth_device *edev)
 	 */
 	writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_ETHER_EN,
 		&fec->eth->ecntrl);
-#if defined(CONFIG_MX25) || defined(CONFIG_MX53)
+#if defined(CONFIG_MX25) || defined(CONFIG_MX53) || defined(CONFIG_MX6SL)
 	udelay(100);
 	/*
 	 * setup the MII gasket for RMII mode
diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h
index 4b4f8b7..0717cc6 100644
--- a/drivers/net/fec_mxc.h
+++ b/drivers/net/fec_mxc.h
@@ -135,7 +135,7 @@  struct ethernet_regs {
 
 	uint32_t res14[7];		/* MBAR_ETH + 0x2E4-2FC */
 
-#if defined(CONFIG_MX25) || defined(CONFIG_MX53)
+#if defined(CONFIG_MX25) || defined(CONFIG_MX53) || defined(CONFIG_MX6SL)
 	uint16_t miigsk_cfgr;		/* MBAR_ETH + 0x300 */
 	uint16_t res15[3];		/* MBAR_ETH + 0x302-306 */
 	uint16_t miigsk_enr;		/* MBAR_ETH + 0x308 */
@@ -202,7 +202,7 @@  struct ethernet_regs {
 #define FEC_X_DES_ACTIVE_TDAR		0x01000000
 #define FEC_R_DES_ACTIVE_RDAR		0x01000000
 
-#if defined(CONFIG_MX25) || defined(CONFIG_MX53)
+#if defined(CONFIG_MX25) || defined(CONFIG_MX53) || defined(CONFIG_MX6SL)
 /* defines for MIIGSK */
 /* RMII frequency control: 0=50MHz, 1=5MHz */
 #define MIIGSK_CFGR_FRCONT		(1 << 6)