public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: macb: sama5d4 is not gigabit capable
@ 2015-12-14 16:37 Gregory CLEMENT
  2015-12-15 19:59 ` Joe Hershberger
  0 siblings, 1 reply; 8+ messages in thread
From: Gregory CLEMENT @ 2015-12-14 16:37 UTC (permalink / raw)
  To: u-boot

During the initialization of PHY the gigabit bit capable is set if the
controller is a GEM. However, for sama5d4, the GEM is not gigabit
capable. Improperly setting the GBE capability leads to an unresponsive
MAC controller. This patch fix this behavior allowing to use the gmac
with the sama5d4.

Suggested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 drivers/net/macb.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index a5c1880..642717d 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -480,8 +480,11 @@ static int macb_phy_init(struct macb_device *macb)
 		return 0;
 	}
 
-	/* First check for GMAC */
-	if (macb_is_gem(macb)) {
+	/*
+	 * First check for GMAC, but not the one on SAMA5D4 which is
+	 * not gigabit capabale
+	 */
+	if (macb_is_gem(macb) && ! cpu_is_sama5d4()) {
 		lpa = macb_mdio_read(macb, MII_STAT1000);
 
 		if (lpa & (LPA_1000FULL | LPA_1000HALF)) {
-- 
2.5.0

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

end of thread, other threads:[~2015-12-16  9:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14 16:37 [U-Boot] [PATCH] net: macb: sama5d4 is not gigabit capable Gregory CLEMENT
2015-12-15 19:59 ` Joe Hershberger
2015-12-16  9:19   ` Nicolas Ferre
2015-12-16  9:35     ` Andreas Bießmann
2015-12-16  9:41       ` Gregory CLEMENT
2015-12-16  9:52         ` Nicolas Ferre
2015-12-16  9:32   ` Gregory CLEMENT
2015-12-16  9:40     ` Andreas Bießmann

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