summaryrefslogtreecommitdiff
path: root/drivers/block/fsl_sata.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2008-07-10 12:05:32 -0500
committerJon Loeliger <jdl@freescale.com>2008-07-10 12:05:32 -0500
commit859f24350e6e4313626f85161dd03f025a4dac59 (patch)
treea025f68619045556e662326c8e1cbc147f9b633e /drivers/block/fsl_sata.c
parent3473ab737282b08ad61841fcbb14c4d264a93a8e (diff)
parente0320b1ebec13755911a53b0af12cbf3e5e49a65 (diff)
Merge commit 'wd/master'
Diffstat (limited to 'drivers/block/fsl_sata.c')
-rw-r--r--drivers/block/fsl_sata.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/block/fsl_sata.c b/drivers/block/fsl_sata.c
index d14f5bc6bf..d441a30ed5 100644
--- a/drivers/block/fsl_sata.c
+++ b/drivers/block/fsl_sata.c
@@ -248,6 +248,10 @@ int init_sata(int dev)
else
printf(" %s ", sata->name);
+ /* Wait PHY RDY signal changed for 500ms */
+ ata_wait_register(&reg->hstatus, HSTATUS_PHY_RDY,
+ HSTATUS_PHY_RDY, 500);
+
/* Check PHYRDY */
val32 = in_le32(&reg->hstatus);
if (val32 & HSTATUS_PHY_RDY) {
@@ -258,6 +262,10 @@ int init_sata(int dev)
return -1;
}
+ /* Wait for signature updated, which is 1st D2H */
+ ata_wait_register(&reg->hstatus, HSTATUS_SIGNATURE,
+ HSTATUS_SIGNATURE, 10000);
+
if (val32 & HSTATUS_SIGNATURE) {
sig = in_le32(&reg->sig);
debug("Signature updated, the sig =%08x\n\r", sig);