From 8e2c2d413c37b7fd13641730b706774c08982f0f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Werner=20B=C3=B6llmann?= Date: Fri, 10 Nov 2017 19:14:20 +0530 Subject: [PATCH] sunxi: SATA link timeout fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit After updating u-boot from v2016.01 to 2017.09, issue with "SATA link 0 timeout." on my Cubietruck board. mdelay milled after moving satapwr code to board. "sunxi: Turn satapwr on from board_init" (sha1: 9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb) After adding the "mdelay(500);" line that was lost in the path the error is gone. Signed-off-by: Werner Böllmann [Rebased and updated change and commit message] Signed-off-by: Jagan Teki Reviewed-by: Jagan Teki --- board/sunxi/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 6e13ee32c1..dcacdf3e62 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -217,6 +217,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); -- 2.39.5