[U-Boot] sunxi: SATA link timeout fix

Werner Böllmann Werner.Boellmann at fh-dortmund.de
Sun Nov 5 13:41:49 UTC 2017


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);



More information about the U-Boot mailing list