From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philip Hands Date: Wed, 10 Aug 2011 14:18:20 +0100 Subject: [U-Boot] OpenRD Ultimate SATA & SD In-Reply-To: <87aadhwnm2.fsf@poker.hands.com> References: <87oc1yw02f.fsf@poker.hands.com> <87aadhwnm2.fsf@poker.hands.com> Message-ID: <87mxfhflr7.fsf@poker.hands.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 16 Jun 2011 21:03:01 +0100, Philip Hands wrote: > On Thu, 16 Jun 2011 16:18:46 +0400, Alexei Ozhigov 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