From patchwork Mon Dec 14 16:37:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 556557 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 565EF14031E for ; Tue, 15 Dec 2015 03:47:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A1974BA8D; Mon, 14 Dec 2015 17:47:03 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hwh4xkCiPVsS; Mon, 14 Dec 2015 17:47:03 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 198704BA91; Mon, 14 Dec 2015 17:47:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 500DD4BA91 for ; Mon, 14 Dec 2015 17:47:00 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IDDrNkSpey6W for ; Mon, 14 Dec 2015 17:47:00 +0100 (CET) X-Greylist: delayed 534 seconds by postgrey-1.34 at theia; Mon, 14 Dec 2015 17:46:55 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by theia.denx.de (Postfix) with ESMTP id 20ACC4BA8D for ; Mon, 14 Dec 2015 17:46:55 +0100 (CET) Received: by mail.free-electrons.com (Postfix, from userid 110) id 92903294; Mon, 14 Dec 2015 17:38:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (81-67-231-93.rev.numericable.fr [81.67.231.93]) by mail.free-electrons.com (Postfix) with ESMTPSA id 48DC8F; Mon, 14 Dec 2015 17:37:50 +0100 (CET) From: Gregory CLEMENT To: Joe Hershberger , u-boot@lists.denx.de Date: Mon, 14 Dec 2015 17:37:41 +0100 Message-Id: <1450111061-32708-1-git-send-email-gregory.clement@free-electrons.com> X-Mailer: git-send-email 2.5.0 Cc: Thomas Petazzoni , Nicolas Ferre Subject: [U-Boot] [PATCH] net: macb: sama5d4 is not gigabit capable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "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 Signed-off-by: Gregory CLEMENT --- 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)) {