From patchwork Tue Apr 3 06:12:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Grinberg X-Patchwork-Id: 150326 X-Patchwork-Delegate: trini@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 8FBD8B6FBD for ; Tue, 3 Apr 2012 16:13:15 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0B28928098; Tue, 3 Apr 2012 08:13:14 +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 sRQ+dnFPix2U; Tue, 3 Apr 2012 08:13:13 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0EBAE2808C; Tue, 3 Apr 2012 08:13:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B2D7D2808C for ; Tue, 3 Apr 2012 08:13:10 +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 4xKQDdqqr5Sw for ; Tue, 3 Apr 2012 08:13:10 +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 softlayer.compulab.co.il (50.23.254.54-static.reverse.softlayer.com [50.23.254.54]) by theia.denx.de (Postfix) with ESMTPS id 01D1E2808A for ; Tue, 3 Apr 2012 08:13:09 +0200 (CEST) Received: from [62.90.235.247] (port=58677 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.69) (envelope-from ) id 1SEwzL-0007DL-TU; Tue, 03 Apr 2012 09:13:08 +0300 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 42AD5644198; Tue, 3 Apr 2012 09:13:05 +0300 (IDT) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b-ufQ2skXzhj; Tue, 3 Apr 2012 09:13:04 +0300 (IDT) Received: from grinberg-linux (grinberg-pc.compulab.local [10.1.1.13]) by zimbra-mta.compulab.co.il (Postfix) with SMTP id 302C2644192; Tue, 3 Apr 2012 09:13:03 +0300 (IDT) Received: by grinberg-linux (sSMTP sendmail emulation); Tue, 03 Apr 2012 09:13:00 +0300 From: Igor Grinberg To: u-boot@lists.denx.de, Sandeep Paulraj , Tom Rini Date: Tue, 3 Apr 2012 09:12:58 +0300 Message-Id: <1333433578-3083-1-git-send-email-grinberg@compulab.co.il> X-Mailer: git-send-email 1.7.3.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il Subject: [U-Boot] [PATCH] cm-t35: fix Ethernet reset timing 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 The reset_net_chip() function has wrong timings for the reset pulse. This appeared to work until: 0607e2b (ARMV7: OMAP: Write more than 1 byte at a time in i2c_write) Fix the Ethernet support by introducing right timings. Signed-off-by: Igor Grinberg --- board/cm_t35/cm_t35.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/board/cm_t35/cm_t35.c b/board/cm_t35/cm_t35.c index bc991c4..ee7d5a0 100644 --- a/board/cm_t35/cm_t35.c +++ b/board/cm_t35/cm_t35.c @@ -362,16 +362,17 @@ static void reset_net_chip(void) { /* Set GPIO1 of TPS65930 as output */ twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02, - TWL4030_BASEADD_GPIO+0x03); + TWL4030_BASEADD_GPIO + 0x03); /* Send a pulse on the GPIO pin */ twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02, - TWL4030_BASEADD_GPIO+0x0C); + TWL4030_BASEADD_GPIO + 0x0C); udelay(1); twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02, - TWL4030_BASEADD_GPIO+0x09); - udelay(1); + TWL4030_BASEADD_GPIO + 0x09); + mdelay(40); twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02, - TWL4030_BASEADD_GPIO+0x0C); + TWL4030_BASEADD_GPIO + 0x0C); + mdelay(1); } #else static inline void reset_net_chip(void) {}