public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Philip Hands <phil@hands.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] OpenRD Ultimate SATA & SD
Date: Wed, 10 Aug 2011 14:18:20 +0100	[thread overview]
Message-ID: <87mxfhflr7.fsf@poker.hands.com> (raw)
In-Reply-To: <87aadhwnm2.fsf@poker.hands.com>

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
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;
=-=-=-=-

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.
-- 
|)|  Philip Hands [+44 (0)20 8530 9560]    http://www.hands.com/
|-|  HANDS.COM Ltd.                    http://www.uk.debian.org/
|(|  10 Onslow Gardens, South Woodford, London  E18 1NE  ENGLAND
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110810/b97b876b/attachment.pgp 

      parent reply	other threads:[~2011-08-10 13:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15  9:54 [U-Boot] OpenRD Ultimate SATA & SD Philip Hands
2011-06-16  5:10 ` Prafulla Wadaskar
2011-06-16 10:19   ` Philip Hands
2011-06-16 12:18     ` Alexei Ozhigov
2011-06-16 20:03       ` Philip Hands
2011-06-17  7:47         ` Prafulla Wadaskar
2011-06-17  8:29           ` Alexei Ozhigov
2011-06-18  5:52             ` Albert ARIBAUD
2011-06-20  9:30               ` Alexei Ozhigov
2011-07-02  6:26                 ` Albert ARIBAUD
2011-08-10 13:18         ` Philip Hands [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mxfhflr7.fsf@poker.hands.com \
    --to=phil@hands.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox