diff mbox

[U-Boot] OpenRD Ultimate SATA & SD

Message ID 87mxfhflr7.fsf@poker.hands.com
State Not Applicable
Headers show

Commit Message

Philip Hands Aug. 10, 2011, 1:18 p.m. UTC
On Thu, 16 Jun 2011 21:03:01 +0100, Philip Hands <phil@hands.com> wrote:
> On Thu, 16 Jun 2011 16:18:46 +0400, Alexei Ozhigov <alexei.ozhigov@gmail.com> wrote:
> ...
> > 
> > I am experiencing the same problem with SATA right now with
> > v2011.06-rc2 (tried also the latest master). If MVSATA_STATUS_TIMEOUT
> > in mvsata_ide_initialize_port is ignored, SATA drive is found on the
> > second port and I am able to read the drive's content.
> 
> Inspired by what you say about timeouts, I thought perhaps increasing
> the timeout from 10ms to 1s might make a difference -- that worked!
> 
> ... except that now, it's working regardless :-(

OK, so now I have a new OpenRD, and the timeout is now making no
=-=-=-=-

It's possible that the second check would work if I had an eSATA drive
plugged in -- I will attempt to borrow one to test this theory.

It seems fair enough to me that one should be allowed to run ide reset
and have it succeed, even if one of the interfaces fails, since one
wants the controller/disk that exists to get initialised, even if the
other one is absent, but perhaps I'm missing the point somehow.

Of course, the hack that I'm using probably doesn't help in the case
where one only has an eSATA drive plugged in.  I suppose one could store
the return from each mvsata_ide_initialize_port call, and return success
if any of them succeeded, or the status of the first one otherwise, say.

Cheers, Phil.
diff mbox

Patch

difference -- this is perhaps because I've not written anything to the
new internal SATA drive yet, so it's factory fresh (I'll see if things
change once it's bootable).

So, at the moment I can get ide reset to work by ignoring the status of
the second SATA in ide_preinit(), thus:

=-=-=-=-
diff --git a/drivers/block/mvsata_ide.c b/drivers/block/mvsata_ide.c
index 1be395f..20fc980 100644
--- a/drivers/block/mvsata_ide.c
+++ b/drivers/block/mvsata_ide.c
@@ -164,8 +164,8 @@  int ide_preinit(void)
        status = mvsata_ide_initialize_port(
                (struct mvsata_port_registers *)
                (CONFIG_SYS_ATA_BASE_ADDR + CONFIG_SYS_ATA_IDE1_OFFSET));
-       if (status)
-               return status;
+/*     if (status)
+               return status; */
 #endif
        /* return success if all ports initializations succeeded */
        return MVSATA_STATUS_OK;