* [U-Boot] [PATCH] sunxi: ahci: Add a delay after enabling target power
@ 2014-11-14 15:30 Hans de Goede
2014-11-14 15:55 ` Ian Campbell
0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2014-11-14 15:30 UTC (permalink / raw)
To: u-boot
If the target power is connected through a gpio, then give the target some
time to power up before continuing with ahci / sata probing, this avoids
link timeouts, without penalizing other boards where there is no target
power gpio.
Why 500 ms ? I started with 200, that was not enough, then I went to 500 which
worked, lowering it to 350 broke things again, so 500 seems the minimum my
vertex2 needs to be ready to get probed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
board/sunxi/ahci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/board/sunxi/ahci.c b/board/sunxi/ahci.c
index 5e12328..b7f0dda 100644
--- a/board/sunxi/ahci.c
+++ b/board/sunxi/ahci.c
@@ -76,6 +76,8 @@ void scsi_init(void)
#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)
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] sunxi: ahci: Add a delay after enabling target power
2014-11-14 15:30 [U-Boot] [PATCH] sunxi: ahci: Add a delay after enabling target power Hans de Goede
@ 2014-11-14 15:55 ` Ian Campbell
0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2014-11-14 15:55 UTC (permalink / raw)
To: u-boot
On Fri, 2014-11-14 at 16:30 +0100, Hans de Goede wrote:
> If the target power is connected through a gpio, then give the target some
> time to power up before continuing with ahci / sata probing, this avoids
> link timeouts, without penalizing other boards where there is no target
> power gpio.
>
> Why 500 ms ? I started with 200, that was not enough, then I went to 500 which
> worked, lowering it to 350 broke things again, so 500 seems the minimum my
> vertex2 needs to be ready to get probed.
;-)
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-14 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-14 15:30 [U-Boot] [PATCH] sunxi: ahci: Add a delay after enabling target power Hans de Goede
2014-11-14 15:55 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox