From patchwork Fri Jul 12 04:28:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 258689 X-Patchwork-Delegate: sbabic@denx.de 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 EE6F92C0345 for ; Fri, 12 Jul 2013 14:54:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 007574A2CB; Fri, 12 Jul 2013 06:53:54 +0200 (CEST) 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 5xfFmNydYNi7; Fri, 12 Jul 2013 06:53:53 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2D85A4A2B4; Fri, 12 Jul 2013 06:53:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6BF3A4A2B4 for ; Fri, 12 Jul 2013 06:53:46 +0200 (CEST) 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 96MdptWkzeKR for ; Fri, 12 Jul 2013 06:53:40 +0200 (CEST) X-Greylist: delayed 1511 seconds by postgrey-1.27 at theia; Fri, 12 Jul 2013 06:53:32 CEST 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-gg0-f178.google.com (mail-gg0-f178.google.com [209.85.161.178]) by theia.denx.de (Postfix) with ESMTPS id 2BB504A2B2 for ; Fri, 12 Jul 2013 06:53:32 +0200 (CEST) Received: by mail-gg0-f178.google.com with SMTP id l12so2952497gge.23 for ; Thu, 11 Jul 2013 21:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=8t7+11oEMQJHsk3z6qPlqwmIcLqC45cNMoXiq2zBdv0=; b=DWSUfl87p64sN9pPrrSDV10tQb9VmPtanEEdXIt0eCil03NgvDlbvneQD6DKJD3SXa gKv8FCl/MRY5Dqg9k48RIlrzw69mOHLqZhVuY62RDK8zxvT+nCOWj2Y8aLnKqia3gzkJ m1biEW+XkBEmmQpSUtqtQZuc4csaQiTSAavIn+bGkg5Nof6by3vCpN4CDSy4GtbBGccv pe0/09NEwE5tkgpEnhfdwnJ7jSt3e7WdgDHz8JZ2iOmaPE4pZ4VCB8TYCJ+KiUJWKAY2 +0sbAOyjE58ihdEEaLD0Rx+TFj7oF3rNPjptHaLDxsYiMg4e9KGhhJJQBncNs6P90zPa NZ4g== X-Received: by 10.236.119.99 with SMTP id m63mr19643080yhh.168.1373603300147; Thu, 11 Jul 2013 21:28:20 -0700 (PDT) Received: from localhost.localdomain ([187.106.36.171]) by mx.google.com with ESMTPSA id i27sm65512016yhj.24.2013.07.11.21.28.18 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Jul 2013 21:28:19 -0700 (PDT) From: Fabio Estevam To: sbabic@denx.de Date: Fri, 12 Jul 2013 01:28:04 -0300 Message-Id: <1373603284-884-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 Cc: marex@denx.de, u-boot@lists.denx.de, Fabio Estevam Subject: [U-Boot] [PATCH] mx28evk: Convert to phylib framework X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 From: Fabio Estevam mx28evk has a LAN8270 ethernet phy and we can use the phylib framework. One of the advantages of converting to phylib is that we no longer see a timeout prior to the first transfer in the 'tftp' command. Signed-off-by: Fabio Estevam --- After applying this patch I get: U-Boot 2013.04-11810-gd6d75ec-dirty (Jul 12 2013 - 01:15:03) CPU: Freescale i.MX28 rev1.2 at 454 MHz BOOT: SSP SD/MMC #0, 3V3 DRAM: 128 MiB MMC: MXS MMC: 0 Video: MXSFB: 'videomode' variable not set! In: serial Out: serial Err: serial Net: Phy not found I still get this 'Phy not found' message, but I think this is not related to the board code. board/freescale/mx28evk/mx28evk.c | 15 +-------------- include/configs/mx28evk.h | 3 ++- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c index 4edd9f4..cd81d58 100644 --- a/board/freescale/mx28evk/mx28evk.c +++ b/board/freescale/mx28evk/mx28evk.c @@ -110,7 +110,6 @@ int board_eth_init(bd_t *bis) { struct mxs_clkctrl_regs *clkctrl_regs = (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE; - struct eth_device *dev; int ret; ret = cpu_eth_init(bis); @@ -133,24 +132,12 @@ int board_eth_init(bd_t *bis) return ret; } - ret = fecmxc_initialize_multi(bis, 1, 3, MXS_ENET1_BASE); + ret = fecmxc_initialize_multi(bis, 1, 1, MXS_ENET1_BASE); if (ret) { puts("FEC MXS: Unable to init FEC1\n"); return ret; } - dev = eth_get_dev_by_name("FEC0"); - if (!dev) { - puts("FEC MXS: Unable to get FEC0 device entry\n"); - return -EINVAL; - } - - dev = eth_get_dev_by_name("FEC1"); - if (!dev) { - puts("FEC MXS: Unable to get FEC1 device entry\n"); - return -EINVAL; - } - return ret; } diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index de69182..2431b83 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -170,12 +170,13 @@ /* Ethernet on SOC (FEC) */ #ifdef CONFIG_CMD_NET -#define CONFIG_NET_MULTI #define CONFIG_ETHPRIME "FEC0" #define CONFIG_FEC_MXC #define CONFIG_MII #define CONFIG_FEC_XCV_TYPE RMII #define CONFIG_MX28_FEC_MAC_IN_OCOTP +#define CONFIG_PHYLIB +#define CONFIG_PHY_SMSC #endif /* RTC */