]> git.sur5r.net Git - u-boot/blobdiff - board/sunxi/ahci.c
sunxi: Add suport for A83T based Banana-pi M3 Board
[u-boot] / board / sunxi / ahci.c
index 0c262eabb754785ca4a53064e47af53feee1d820..6d51b9b8e95b81ce6b84e1a982ce699b816a16de 100644 (file)
@@ -74,11 +74,14 @@ void scsi_init(void)
 {
        printf("SUNXI SCSI INIT\n");
 #ifdef CONFIG_SATAPWR
+       gpio_request(CONFIG_SATAPWR, "satapwr");
        gpio_direction_output(CONFIG_SATAPWR, 1);
+       /* Give attached sata device time to power-up to avoid link timeouts */
+       mdelay(500);
 #endif
 
        if (sunxi_ahci_phy_init(SUNXI_SATA_BASE) < 0)
                return;
 
-       ahci_init(SUNXI_SATA_BASE);
+       ahci_init((void __iomem *)SUNXI_SATA_BASE);
 }