From patchwork Mon Aug 16 18:19:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldo Cedillo X-Patchwork-Id: 71816 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id 5DC3A1557E4 for ; Mon, 16 Aug 2010 20:22:26 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id 48F71316EC0F for ; Mon, 16 Aug 2010 20:22:26 +0200 (MEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Mon, 16 Aug 2010 20:22:26 +0200 (MEST) Received: from murder ([192.168.8.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Mon, 16 Aug 2010 20:20:51 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend1.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Mon, 16 Aug 2010 20:20:51 +0200 Received: from scanner-2.m-online.net (scanner-2.mail.m-online.net [192.168.8.166]) by mail.m-online.net (Postfix) with ESMTP id 5103C1C001E3; Mon, 16 Aug 2010 20:20:51 +0200 (CEST) Received: from mxin-2.m-online.net ([192.168.1.21]) by scanner-2.m-online.net (scanner-2.m-online.net [192.168.8.166]) (amavisd-new, port 10026) with ESMTP id 22351-04-2; Mon, 16 Aug 2010 20:20:49 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-2.m-online.net (Postfix) with ESMTP id 57F13468D64; Mon, 16 Aug 2010 20:20:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 69BC028086; Mon, 16 Aug 2010 20:20:43 +0200 (CEST) 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 UKKK4B7He+A7; Mon, 16 Aug 2010 20:20:43 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7D0E428088; Mon, 16 Aug 2010 20:20:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 234E228084 for ; Mon, 16 Aug 2010 20:20:35 +0200 (CEST) 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 kZj1X11wS5f9 for ; Mon, 16 Aug 2010 20:20:33 +0200 (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 devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id 069DF28083 for ; Mon, 16 Aug 2010 20:20:30 +0200 (CEST) Received: from dlep35.itg.ti.com ([157.170.170.118]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o7GIKSLp000353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 16 Aug 2010 13:20:29 -0500 Received: from emcc1.sasken-mty.naucm.ext.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id o7GIKRSi009224; Mon, 16 Aug 2010 13:20:28 -0500 (CDT) Received: from localhost.localdomain (aldobrett-desktop.sasken-mty.naucm.ext.ti.com [10.87.230.72]) by emcc1.sasken-mty.naucm.ext.ti.com (8.13.8+Sun/8.13.8) with ESMTP id o7GIKQot003361; Mon, 16 Aug 2010 13:20:27 -0500 (CDT) From: Aldo Brett Cedillo Martinez To: u-boot@lists.denx.de Date: Mon, 16 Aug 2010 13:19:38 -0500 Message-Id: <1281982778-15262-1-git-send-email-aldo.cedillo@ti.com> X-Mailer: git-send-email 1.6.3.3 Cc: Aldo Brett Cedillo Martinez Subject: [U-Boot] [PATCH] [U-BOOT] Zoom2: Ethernet: Enabling LAN9221 chip and CMD_NET. 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 X-Virus-Scanned: by amavisd-new at m-online.net Configures GPMC, adds macros to enable net commands, and adds proper initialization to board_eth_init function. I have a similar patch to enable ethernet in zoom3 after initial support patch. Signed-off-by: Aldo Brett Cedillo Martinez --- board/logicpd/zoom2/zoom2.c | 21 +++++++++++++++++++++ include/configs/omap3_zoom2.h | 10 +++++++++- 2 files changed, 30 insertions(+), 1 deletions(-) diff --git a/board/logicpd/zoom2/zoom2.c b/board/logicpd/zoom2/zoom2.c index e9f6625..54d3e9f 100644 --- a/board/logicpd/zoom2/zoom2.c +++ b/board/logicpd/zoom2/zoom2.c @@ -60,6 +60,16 @@ static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = { 0x1D0904C4, 0 }; +/* Ethernet GPMC configuration */ +static u32 gpmc_eth[GPMC_MAX_REG] = { + NET_GPMC_CONFIG1, + NET_GPMC_CONFIG2, + NET_GPMC_CONFIG3, + NET_GPMC_CONFIG4, + NET_GPMC_CONFIG5, + NET_GPMC_CONFIG6, 0 +}; + /* Used to track the revision of the board */ static zoom2_revision revision = ZOOM2_REVISION_UNKNOWN; @@ -130,6 +140,12 @@ int board_init (void) enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[3], SERIAL_TL16CP754C_BASE, GPMC_SIZE_16M); +#ifdef CONFIG_CMD_NET + gpmc_config = gpmc_eth; + enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[7], + CONFIG_SMC911X_BASE, GPMC_SIZE_16M); +#endif /* (CONFIG_CMD_NET) */ + /* board id for Linux */ gd->bd->bi_arch_number = MACH_TYPE_OMAP_ZOOM2; /* boot param addr */ @@ -186,6 +202,11 @@ int board_eth_init(bd_t *bis) #ifdef CONFIG_LAN91C96 rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE); #endif + +#ifdef CONFIG_SMC911X + rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); +#endif + return rc; } #endif diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h index eef95fe..c66d571 100644 --- a/include/configs/omap3_zoom2.h +++ b/include/configs/omap3_zoom2.h @@ -154,7 +154,7 @@ #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ -#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #undef CONFIG_CMD_NFS /* NFS support */ #define CONFIG_SYS_NO_FLASH @@ -165,6 +165,14 @@ #define CONFIG_SYS_I2C_BUS_SELECT 1 #define CONFIG_DRIVER_OMAP34XX_I2C 1 +/* Ethernet */ +#ifdef CONFIG_CMD_NET +#define CONFIG_NET_MULTI +#define CONFIG_SMC911X +#define CONFIG_SMC911X_32_BIT +#define CONFIG_SMC911X_BASE 0x2C000000 +#endif /* (CONFIG_CMD_NET) */ + /* * TWL4030 */