From patchwork Sun Nov 5 13:41:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Werner_B=C3=B6llmann?= X-Patchwork-Id: 834358 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yVLRz23hDz9sPt for ; Mon, 6 Nov 2017 03:17:01 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id DF40EC21D6A; Sun, 5 Nov 2017 16:16:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 00EB8C21C60; Sun, 5 Nov 2017 16:16:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3685EC21C60; Sun, 5 Nov 2017 13:41:56 +0000 (UTC) Received: from mailin4.fh-dortmund.de (mailin4.fh-dortmund.de [193.25.16.44]) by lists.denx.de (Postfix) with SMTP id D88FAC21C45 for ; Sun, 5 Nov 2017 13:41:55 +0000 (UTC) Received: from mailin4.fh-dortmund.de (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id A1C53A73BC_9FF1523B for ; Sun, 5 Nov 2017 13:41:55 +0000 (GMT) Received: from fh-dortmund.de (maia2.fh-dortmund.de [193.25.17.22]) by mailin4.fh-dortmund.de (Sophos Email Appliance) with ESMTP id 8BAEDA473E_9FF1523F for ; Sun, 5 Nov 2017 13:41:55 +0000 (GMT) Received: from maia2-MTA by fh-dortmund.de with Novell_GroupWise; Sun, 05 Nov 2017 14:41:55 +0100 Message-Id: <59FF151D0200008100047E53@fh-dortmund.de> X-Mailer: Novell GroupWise Internet Agent 14.2.2 Date: Sun, 05 Nov 2017 14:41:49 +0100 From: =?utf-8?q?Werner_B=C3=B6llmann?= To: References: <59FF151D0200008100047E53@fh-dortmund.de> Mime-Version: 1.0 Content-Disposition: inline X-Mailman-Approved-At: Sun, 05 Nov 2017 16:16:51 +0000 Subject: [U-Boot] sunxi: SATA link timeout fix X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board. I tracked this down to this patch. http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb. After adding the "mdelay(500);" line that was lost in the path the error is gone. Thank you. Werner diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 70e0143..b38941f 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -216,6 +216,8 @@ int board_init(void) satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR); gpio_request(satapwr_pin, "satapwr"); gpio_direction_output(satapwr_pin, 1); + /* Give attached sata device time to power-up to avoid link timeouts */ + mdelay(500); #endif #ifdef CONFIG_MACPWR macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR);