Skip to contentSkip to conversation

da850/omap-l138: Enable auto negotiation in RMII mode

PATCH New Prabhakar Lad 5 participants 7 messages Jun 1, 2012 – Jun 7, 2012 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 da850/omap-l138: Enable auto negotiation in RMII mode

From: Rajashekhara, Sudhakar <[email protected]>

On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode.

---
 drivers/net/davinci_emac.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/davinci_emac.c +5 -0
index fbd0f1b..9bbd625 100644
@@ -895,5 +895,10 @@ int davinci_emac_initialize(void)
 		miiphy_register(phy[i].name, davinci_mii_phy_read,
 						davinci_mii_phy_write);
 	}
+
+#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \
+		defined(CONFIG_MACH_DAVINCI_DA850_EVM)
+	gen_auto_negotiate(active_phy_addr);
+#endif
 	return(1);
 }
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 da850/omap-l138: Enable auto negotiation in RMII mode

Quoted 20 lines · Prabhakar Lad

From: Rajashekhara, Sudhakar <[email protected]>

On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode.

---
 drivers/net/davinci_emac.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/davinci_emac.c +0 -0
index fbd0f1b..9bbd625 100644

drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 902

Quoted 8 lines
drivers/net/davinci_emac.c +5 -0
@@ -895,5 +895,10 @@ int davinci_emac_initialize(void)
 		miiphy_register(phy[i].name, davinci_mii_phy_read,
 						davinci_mii_phy_write);
 	}
+
+#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \
+		defined(CONFIG_MACH_DAVINCI_DA850_EVM)
+	gen_auto_negotiate(active_phy_addr);
+#endif

Why not just check on CONFIG_DRIVER_TI_EMAC_USE_RMII ? Would it be harmful to try and re-auto negotiate on some RMII hardware that already did it?

Signature · 1 line
Tom
#2 lore raw

PATCH 1/1 da850/omap-l138: Enable auto negotiation in RMII mode

Hi Tom,

Quoted 15 lines · Tom
Quoted 14 lines · Prabhakar Lad

From: Rajashekhara, Sudhakar <[email protected]>

On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode.

---
 drivers/net/davinci_emac.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Quoted 15 lines

drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 902

Quoted 13 lines
drivers/net/davinci_emac.c +5 -0
index fbd0f1b..9bbd625 100644
@@ -895,5 +895,10 @@ int davinci_emac_initialize(void)
 		miiphy_register(phy[i].name, davinci_mii_phy_read,
 						davinci_mii_phy_write);
 	}
+
+#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \
+		defined(CONFIG_MACH_DAVINCI_DA850_EVM)
+	gen_auto_negotiate(active_phy_addr);
+#endif

Why not just check on CONFIG_DRIVER_TI_EMAC_USE_RMII ? Would it be harmful to try and re-auto negotiate on some RMII hardware that already did it?

Some of the phy's might not support auto negotiation, Not sure what will be
the behavior on these phy's on enabling auto negotiation. So as to avoid this case this check is added.

Thx,
--Prabhakar Lad

Quoted 4 lines

--
Tom

#3 lore raw

PATCH 1/1 da850/omap-l138: Enable auto negotiation in RMII mode

In reply to Prabhakar Lad

Hi,

Quoted 8 lines · Prabhakar Lad

From: Rajashekhara, Sudhakar <[email protected]>

On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode.

This patch causes a warning for the ea20 board:
davinci_emac.c: In function 'davinci_emac_initialize':
davinci_emac.c:901:2: warning: passing argument 1 of 'gen_auto_negotiate' makes integer from pointer without a cast davinci_emac.c:355:12: note: expected 'int' but argument is of type 'u_int8_t *'

(found with ./MAKEALL -s davinci)

Regards, Christian

Quoted 29 lines

---
?drivers/net/davinci_emac.c | ? ?5 +++++
?1 files changed, 5 insertions(+), 0 deletions(-)

drivers/net/davinci_emac.c +5 -1
index fbd0f1b..9bbd625 100644
@@ -895,5 +895,10 @@ int davinci_emac_initialize(void)
 ? ? ? ? ? ? ? ?miiphy_register(phy[i].name, davinci_mii_phy_read,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?davinci_mii_phy_write);
 ? ? ? ?}
+
+#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \
+ ? ? ? ? ? ? ? defined(CONFIG_MACH_DAVINCI_DA850_EVM)
+ ? ? ? gen_auto_negotiate(active_phy_addr);
+#endif
 ? ? ? ?return(1);
 ?}
--

1.7.4.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#4 lore raw

PATCH 1/1 da850/omap-l138: Enable auto negotiation in RMII mode

Hi Christian,

Quoted 12 lines · Christian Riesch

Hi,

Quoted 8 lines · Prabhakar Lad

From: Rajashekhara, Sudhakar <[email protected]>

On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode.

Quoted 8 lines

This patch causes a warning for the ea20 board:
davinci_emac.c: In function 'davinci_emac_initialize':
davinci_emac.c:901:2: warning: passing argument 1 of 'gen_auto_negotiate' makes integer from pointer without a cast davinci_emac.c:355:12: note: expected 'int' but argument is of type 'u_int8_t *'

(found with ./MAKEALL -s davinci)

Ok I'll fix this.

Thx,
--Prabhakar Lad

Quoted 32 lines

Regards, Christian

Quoted 29 lines

---
?drivers/net/davinci_emac.c | ? ?5 +++++
?1 files changed, 5 insertions(+), 0 deletions(-)

drivers/net/davinci_emac.c +5 -1
index fbd0f1b..9bbd625 100644
@@ -895,5 +895,10 @@ int davinci_emac_initialize(void)
 ? ? ? ? ? ? ? ?miiphy_register(phy[i].name, davinci_mii_phy_read,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?davinci_mii_phy_write);
 ? ? ? ?}
+
+#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \
+ ? ? ? ? ? ? ? defined(CONFIG_MACH_DAVINCI_DA850_EVM)
+ ? ? ? gen_auto_negotiate(active_phy_addr);
+#endif
 ? ? ? ?return(1);
 ?}
--

1.7.4.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#5 lore raw

PATCH 1/1 da850/omap-l138: Enable auto negotiation in RMII mode

In reply to Prabhakar Lad

Hi Prabhakar,

Le Fri, 1 Jun 2012 19:04:37 +0530,
Prabhakar Lad <[email protected]> a ?crit :

Quoted 11 lines

From: Rajashekhara, Sudhakar <[email protected]>

On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode.

on an AM1808 with a RMII PHY where tftp was nearly always failing.

Eric

#6 lore raw

PATCH 1/1 da850/omap-l138: Enable auto negotiation in RMII mode

Hi Eric,

Quoted 13 lines · Eric B?nard

Hi Prabhakar,

Le Fri, 1 Jun 2012 19:04:37 +0530,
Prabhakar Lad <[email protected]> a ?crit :

Quoted 8 lines

From: Rajashekhara, Sudhakar <[email protected]>

On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode.

Quoted 7 lines
Quoted 3 lines

on an AM1808 with a RMII PHY where tftp was nearly always failing.

This patch had some build warnings which has been fixed in v2 version (http://www.mail-archive.com/u-boot at lists.denx.de/msg85270.html) can you test this patch and Ack it.

Thx,
--Prabhakar Lad

Quoted 2 lines

Eric