]> git.sur5r.net Git - u-boot/commitdiff
sunxi: SATA link timeout fix
authorWerner Böllmann <Werner.Boellmann@fh-dortmund.de>
Fri, 10 Nov 2017 13:44:20 +0000 (19:14 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 10 Nov 2017 13:51:24 +0000 (19:21 +0530)
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 <Werner.Boellmann@fh-dortmund.de>
[Rebased and updated change and commit message]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
board/sunxi/board.c

index 6e13ee32c14d7715739f2dcbdbbff4c54b839862..dcacdf3e626db2fc454a708a2f35d8910cf8556c 100644 (file)
@@ -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);