From: =?UTF-8?Q?Werner=20B=C3=B6llmann?= Date: Sun, 05 Nov 2017 14:41:49 +0100 Subject: [U-Boot] sunxi: SATA link timeout fix References: <59FF151D0200008100047E53@fh-dortmund.de> Message-ID: <59FF151D0200008100047E53@fh-dortmund.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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);