From patchwork Tue Jan 11 19:48:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 78426 X-Patchwork-Delegate: s-paulraj@ti.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 0860EB6EF2 for ; Wed, 12 Jan 2011 06:50:17 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2B589280D8; Tue, 11 Jan 2011 20:50:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 X3mRvKP00vx8; Tue, 11 Jan 2011 20:50:10 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA4D6280D1; Tue, 11 Jan 2011 20:50:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 29EF7280D1 for ; Tue, 11 Jan 2011 20:50:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 QDEkHWayNGOD for ; Tue, 11 Jan 2011 20:49:56 +0100 (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 na3sys009aog113.obsmtp.com (na3sys009aog113.obsmtp.com [74.125.149.209]) by theia.denx.de (Postfix) with SMTP id 06BEF280C9 for ; Tue, 11 Jan 2011 20:49:54 +0100 (CET) Received: from source ([209.85.213.176]) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKTSy0YRBWmYxsA+biTpILewojWe29908q@postini.com; Tue, 11 Jan 2011 11:49:56 PST Received: by mail-yx0-f176.google.com with SMTP id 8so10154659yxm.7 for ; Tue, 11 Jan 2011 11:49:53 -0800 (PST) Received: by 10.236.105.244 with SMTP id k80mr18216yhg.60.1294775367359; Tue, 11 Jan 2011 11:49:27 -0800 (PST) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id 72sm18209793yhl.38.2011.01.11.11.49.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Jan 2011 11:49:26 -0800 (PST) From: Ben Gardiner To: Stefano Babic Date: Tue, 11 Jan 2011 14:48:17 -0500 Message-Id: X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/2] ea20: fix undefined PHY_* errors X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This patch fixes ea20 after 8ef583a0351590a91394499eb5ca2ab8a703d959 where the u-boot custom PHY_ macros were replaced with those of linux/mii.h MII_ definitions except in the RMII support for davinci_emac. Probably also due to the merge path of changes in 2010.12. Signed-off-by: Ben Gardiner CC: Mike Frysinger Acked-by: Mike Frysinger --- drivers/net/davinci_emac.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 56cd2aa..533f7a4 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -247,10 +247,10 @@ static int gen_get_link_speed(int phy_addr) (tmp & 0x04)) { #if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \ defined(CONFIG_MACH_DAVINCI_DA850_EVM) - davinci_eth_phy_read(phy_addr, PHY_ANLPAR, &tmp); + davinci_eth_phy_read(phy_addr, MII_LPA, &tmp); /* Speed doesn't matter, there is no setting for it in EMAC. */ - if (tmp & (PHY_ANLPAR_TXFD | PHY_ANLPAR_10FD)) { + if (tmp & (LPA_100FULL | LPA_10FULL)) { /* set EMAC for Full Duplex */ writel(EMAC_MACCONTROL_MIIEN_ENABLE | EMAC_MACCONTROL_FULLDUPLEX_ENABLE, @@ -261,7 +261,7 @@ static int gen_get_link_speed(int phy_addr) &adap_emac->MACCONTROL); } - if (tmp & (PHY_ANLPAR_TXFD | PHY_ANLPAR_TX)) + if (tmp & (LPA_100FULL | LPA_100HALF)) writel(readl(&adap_emac->MACCONTROL) | EMAC_MACCONTROL_RMIISPEED_100, &adap_emac->MACCONTROL);