Patchwork [U-Boot,04/11] FEC: Add RMII mode support

login
register
mail settings
Submitter Marek Vasut
Date Sept. 12, 2011, 4:05 a.m.
Message ID <1315800339-19823-5-git-send-email-marek.vasut@gmail.com>
Download mbox | patch
Permalink /patch/114269/
State Accepted
Commit a50a90c90e723a5d6152f0046db72fc598a73abe
Delegated to: Stefano Babic
Headers show

Comments

Marek Vasut - Sept. 12, 2011, 4:05 a.m.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
---
 drivers/net/fec_mxc.c |    2 ++
 drivers/net/fec_mxc.h |    4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)
Stefano Babic - Sept. 22, 2011, 10:58 a.m.
On 09/12/2011 06:05 AM, Marek Vasut wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Ben Warren <biggerbadderben@gmail.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Detlev Zundel <dzu@denx.de>
> ---

Applied to u-boot-imx, next branch, thanks.

Best regards,
Stefano Babic

Patch

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 9a99272..32854fb 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -448,6 +448,8 @@  static int fec_init(struct eth_device *dev, bd_t* bd)
 	rcntrl = PKTSIZE << FEC_RCNTRL_MAX_FL_SHIFT;
 	if (fec->xcv_type == SEVENWIRE)
 		rcntrl |= FEC_RCNTRL_FCE;
+	else if (fec->xcv_type == RMII)
+		rcntrl |= FEC_RCNTRL_RMII;
 	else	/* MII mode */
 		rcntrl |= FEC_RCNTRL_FCE | FEC_RCNTRL_MII_MODE;
 
diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h
index 1ba5161..f16f9db 100644
--- a/drivers/net/fec_mxc.h
+++ b/drivers/net/fec_mxc.h
@@ -194,6 +194,7 @@  struct ethernet_regs {
 #define FEC_RCNTRL_PROM			0x00000008
 #define FEC_RCNTRL_BC_REJ		0x00000010
 #define FEC_RCNTRL_FCE			0x00000020
+#define FEC_RCNTRL_RMII			0x00000100
 
 #define FEC_TCNTRL_GTS			0x00000001
 #define FEC_TCNTRL_HBC			0x00000002
@@ -257,7 +258,8 @@  struct fec_bd {
 enum xceiver_type {
 	SEVENWIRE,	/* 7-wire       */
 	MII10,		/* MII 10Mbps   */
-	MII100		/* MII 100Mbps  */
+	MII100,		/* MII 100Mbps  */
+	RMII		/* RMII */
 };
 
 /**