* [U-Boot] OpenRD Ultimate SATA & SD
@ 2011-06-15 9:54 Philip Hands
2011-06-16 5:10 ` Prafulla Wadaskar
0 siblings, 1 reply; 11+ messages in thread
From: Philip Hands @ 2011-06-15 9:54 UTC (permalink / raw)
To: u-boot
Hi,
I've been trying to get a version of u-boot for OpenRD Ultimate that is
willing to boot from all of NAND, USB, SD and SATA, and find that SD &
SATA is still not possible with -rc1 as packaged for Debian (and it
seems that nothing in the subsequent work in the master git would help,
but if people tell me that it does, I'll give that a try).
SATA throws an error in ide_preinit in drivers/block/mvsata_ide.c, and
having looked into it, the second call to mvsata_ide_initialize_port is
what fails.
This is with a SATA drive plugged into the on-board SATA port, and with
nothing plugged into the eSATA port.
If I #undef CONFIG_SYS_ATA_IDE1_OFFSET in include/configs/openrd.h
then the second mvsata_ide_initialize_port call is disabled, and I can
then boot from SATA, but I've not got an eSATA drive to test whether it
would have worked if I had one plugged in.
I note that there is still something a little odd going on, since the
drive seems to get detected twice:
Marvell>> ide reset
Reset IDE: Bus 0: OK Bus 1: OK
Device 0: Model: HITACHI HTS723216L9SA60 Firm: FC2ZC50B Ser#: 091005FC1220NCHXGPLG
Type: Hard Disk
Supports 48-bit addressing
Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
Device 1: Model: HITACHI HTS723216L9SA60 Firm: FC2ZC50B Ser#: 091005FC1220NCHXGPLG
Type: Hard Disk
Supports 48-bit addressing
Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
but it seems to work OK anyway.
As for the SD -- it detects OK, but seems to be unable to read more than
a small amount of data from the SD card, as seen here:
Marvell>> mmc init
SDHC found. Card desciption is:
Manufacturer: 0x1e, OEM "AB"
Product name: "USD ", revision 1.0
Serial number: 93331321
Manufacturing date: 8/2010
CRC: 0x00, b0 = 0
mmc1 is available
Marvell>> ext2ls mmc 0
<DIR> 1024 .
<DIR> 1024 ..
<DIR> 12288 lost+found
1433576 vmlinuz-2.6.32-5-kir
at which point it hangs.
If I take the same SD card, put it in an SD-to-USB adaptor and then
access it via the USB, I can boot the kernel, whereas it just locks up
when accessed as an SD, which also seems to point at it not being able
to do more than a small read via SD.
Any suggestions on how to diagnose what's going on here would be most
welcome. I've tried pointing gdb at it, but it seems not to be doing
breakpoints as I'd expect, so hints on how to get gdb working as well
would be helpful (yes, I am rather new to this :-)
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/20110615/646ac4c2/attachment.pgp
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
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
0 siblings, 1 reply; 11+ messages in thread
From: Prafulla Wadaskar @ 2011-06-16 5:10 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
> On Behalf Of Philip Hands
> Sent: Wednesday, June 15, 2011 3:24 PM
> To: u-boot at lists.denx.de
> Subject: [U-Boot] OpenRD Ultimate SATA & SD
>
> Hi,
Hi Phil
Thanks for the feedback.
>
> I've been trying to get a version of u-boot for OpenRD Ultimate that is
> willing to boot from all of NAND, USB, SD and SATA, and find that SD &
> SATA is still not possible with -rc1 as packaged for Debian (and it
> seems that nothing in the subsequent work in the master git would help,
> but if people tell me that it does, I'll give that a try).
I don't know which u-boot version you are referring? Once packed with board or one from u-boot.git.
For other one, u-boot.git (mainlined) SATA is functional, SD not yet supported.
Regards..
Prafulla . .
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
2011-06-16 5:10 ` Prafulla Wadaskar
@ 2011-06-16 10:19 ` Philip Hands
2011-06-16 12:18 ` Alexei Ozhigov
0 siblings, 1 reply; 11+ messages in thread
From: Philip Hands @ 2011-06-16 10:19 UTC (permalink / raw)
To: u-boot
On Wed, 15 Jun 2011 22:10:30 -0700, Prafulla Wadaskar <prafulla@marvell.com> wrote:
>
>
> > -----Original Message-----
> > From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
> > On Behalf Of Philip Hands
> > Sent: Wednesday, June 15, 2011 3:24 PM
> > To: u-boot at lists.denx.de
> > Subject: [U-Boot] OpenRD Ultimate SATA & SD
> >
> > Hi,
>
> Hi Phil
> Thanks for the feedback.
>
> >
> > I've been trying to get a version of u-boot for OpenRD Ultimate that is
> > willing to boot from all of NAND, USB, SD and SATA, and find that SD &
> > SATA is still not possible with -rc1 as packaged for Debian (and it
> > seems that nothing in the subsequent work in the master git would help,
> > but if people tell me that it does, I'll give that a try).
>
> I don't know which u-boot version you are referring? Once packed with board or one from u-boot.git.
What I'm using is very close to this:
http://anonscm.debian.org/gitweb/?p=collab-maint/u-boot.git;a=summary
which is, as mentioned, the upstream (i.e. as available from denx.de)
with debian patches added, the main effect of the patches being that one
can then build them as a package -- this used to make more of a
difference when we had a diff aimed at the OpenRD, but as you can see
that was dropped by Clint on 2011-05-21 when it was merged into the
upstream tree:
Drop openrd-client-and-ultimate.diff (merged).
I've since pulled from git://git.denx.de/u-boot.git, and rebased the
Debian stuff, with my tiny patch added, as seen here:
http://git.hands.com/u-boot
the Debian build system applies the quilt patches (that are in
./debian/patches) so to see what actually gets built, see:
http://git.hands.com/?p=u-boot.git;a=shortlog;h=refs/heads/patch-queue/master
which has a commit for each of those patches, as applied, tacked on
after the master branch.
Just to make sure it's not been fixed somehow, I've just recompiled that
without the last "fil-sata-kludge.diff" patch applied (my IRC nick is
'fil' BTW) and now it has now reverted to telling me this:
=-=-=-=-
Marvell>> ide reset
Reset IDE: ide_preinit failed
=-=-=-=-
so that diff is required to make SATA work in the setup I have on the
OpenRD Ultimate (internal SATA, no eSATA).
> For other one, u-boot.git (mainlined) SATA is functional, SD not yet
> supported.
OK, so as I said, SATA only works for me if I disable the probing of the
second SATA port in ide_preinit, as described here:
http://git.hands.com/?p=u-boot.git;a=commit;h=142f614593c4738fdd9c466d33eb41ef16b6a6b1
As for SD, well, it claims to initialise:
Marvell>> mmc init
SDHC found. Card desciption is:
Manufacturer: 0x1e, OEM "AB"
Product name: "USD ", revision 1.0
Serial number: 93331321
Manufacturing date: 8/2010
CRC: 0x00, b0 = 0
mmc1 is available
and then in the past, doing any reading would make it lock up, but I
notice that the version I just built actually lets me boot from SD, so
it might be unsupported, but it works some of the time, at least.
I'll see if I can narrow down when it works for me, or not.
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/20110616/66eb553c/attachment.pgp
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
2011-06-16 10:19 ` Philip Hands
@ 2011-06-16 12:18 ` Alexei Ozhigov
2011-06-16 20:03 ` Philip Hands
0 siblings, 1 reply; 11+ messages in thread
From: Alexei Ozhigov @ 2011-06-16 12:18 UTC (permalink / raw)
To: u-boot
2011/6/16 Philip Hands <phil@hands.com>:
> On Wed, 15 Jun 2011 22:10:30 -0700, Prafulla Wadaskar <prafulla@marvell.com> wrote:
>>
>>
>> > -----Original Message-----
>> > From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
>> > On Behalf Of Philip Hands
>> > Sent: Wednesday, June 15, 2011 3:24 PM
>> > To: u-boot at lists.denx.de
>> > Subject: [U-Boot] OpenRD Ultimate SATA & SD
>> >
>> > Hi,
>>
>> Hi Phil
>> Thanks for the feedback.
>>
>> >
>> > I've been trying to get a version of u-boot for OpenRD Ultimate that is
>> > willing to boot from all of NAND, USB, SD and SATA, and find that SD &
>> > SATA is still not possible with -rc1 as packaged for Debian (and it
>> > seems that nothing in the subsequent work in the master git would help,
>> > but if people tell me that it does, I'll give that a try).
>>
>> I don't know which u-boot version you are referring? Once packed with board or one from u-boot.git.
>
> What I'm using is very close to this:
>
> ?http://anonscm.debian.org/gitweb/?p=collab-maint/u-boot.git;a=summary
>
> which is, as mentioned, the upstream (i.e. as available from denx.de)
> with debian patches added, the main effect of the patches being that one
> can then build them as a package -- this used to make more of a
> difference when we had a diff aimed at the OpenRD, but as you can see
> that was dropped by Clint on 2011-05-21 when it was merged into the
> upstream tree:
>
> ?Drop openrd-client-and-ultimate.diff (merged).
>
> I've since pulled from git://git.denx.de/u-boot.git, and rebased the
> Debian stuff, with my tiny patch added, as seen here:
>
> ?http://git.hands.com/u-boot
>
> the Debian build system applies the quilt patches (that are in
> ./debian/patches) so to see what actually gets built, see:
>
> ?http://git.hands.com/?p=u-boot.git;a=shortlog;h=refs/heads/patch-queue/master
>
> which has a commit for each of those patches, as applied, tacked on
> after the master branch.
>
> Just to make sure it's not been fixed somehow, I've just recompiled that
> without the last "fil-sata-kludge.diff" patch applied (my IRC nick is
> 'fil' BTW) and now it has now reverted to telling me this:
>
> =-=-=-=-
> Marvell>> ide reset
>
> Reset IDE: ide_preinit failed
> =-=-=-=-
>
> so that diff is required to make SATA work in the setup I have on the
> OpenRD Ultimate (internal SATA, no eSATA).
>
>> For other one, u-boot.git (mainlined) SATA is functional, SD not yet
>> supported.
>
> OK, so as I said, SATA only works for me if I disable the probing of the
> second SATA port in ide_preinit, as described here:
>
> ?http://git.hands.com/?p=u-boot.git;a=commit;h=142f614593c4738fdd9c466d33eb41ef16b6a6b1
>
> As for SD, well, it claims to initialise:
>
> Marvell>> mmc init
> SDHC found. Card desciption is:
> Manufacturer: ? ? ? 0x1e, OEM "AB"
> Product name: ? ? ? "USD ?", revision 1.0
> Serial number: ? ? ?93331321
> Manufacturing date: 8/2010
> CRC: ? ? ? ? ? ? ? ?0x00, b0 = 0
> mmc1 is available
>
> and then in the past, doing any reading would make it lock up, but I
> notice that the version I just built actually lets me boot from SD, so
> it might be unsupported, but it works some of the time, at least.
>
> I'll see if I can narrow down when it works for me, or not.
>
> 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
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>
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.
Best regards
Alexey Ozhigov
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
2011-06-16 12:18 ` Alexei Ozhigov
@ 2011-06-16 20:03 ` Philip Hands
2011-06-17 7:47 ` Prafulla Wadaskar
2011-08-10 13:18 ` Philip Hands
0 siblings, 2 replies; 11+ messages in thread
From: Philip Hands @ 2011-06-16 20:03 UTC (permalink / raw)
To: u-boot
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 :-(
So, I've no idea if that's really related to what's going on, because
I've now gone as far as reducing the timeout to 5ms and it's _still_
working fine, so perhaps some part of the SATA subsystem was in a state
that was somehow reset by waiting a bit longer for the startup once, and
that's somehow "fixed" it.
It is still working despite powering down the machine for a while, so
I'm guessing whatever changed is something to do with the state of the
hard drive.
Sadly that means that I've now lost the ability to test this, since
trying any of the versions that were previously failing now work.
Anyway, Alexei, try increasing the timeout (i.e. the value being
assigned to timeleft) --- if that works for you too, it seems pretty
harmless, so might be appropriate for wider adoption.
=-=-=-=-
Meanwhile, the SD has reverted to being broken, so that ext2ls just
hangs in the read, by the looks of it :-/
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/20110616/ada24d67/attachment.pgp
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
2011-06-16 20:03 ` Philip Hands
@ 2011-06-17 7:47 ` Prafulla Wadaskar
2011-06-17 8:29 ` Alexei Ozhigov
2011-08-10 13:18 ` Philip Hands
1 sibling, 1 reply; 11+ messages in thread
From: Prafulla Wadaskar @ 2011-06-17 7:47 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Philip Hands [mailto:phil at hands.com]
> Sent: Friday, June 17, 2011 1:33 AM
> To: Alexei Ozhigov
> Cc: Prafulla Wadaskar; u-boot at lists.denx.de; Prabhanjan Sarnaik; Ashish
> Karkare
> Subject: Re: [U-Boot] OpenRD Ultimate SATA & SD
>
> 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 :-(
>
> So, I've no idea if that's really related to what's going on, because
> I've now gone as far as reducing the timeout to 5ms and it's _still_
> working fine, so perhaps some part of the SATA subsystem was in a state
> that was somehow reset by waiting a bit longer for the startup once, and
> that's somehow "fixed" it.
>
> It is still working despite powering down the machine for a while, so
> I'm guessing whatever changed is something to do with the state of the
> hard drive.
>
> Sadly that means that I've now lost the ability to test this, since
> trying any of the versions that were previously failing now work.
>
> Anyway, Alexei, try increasing the timeout (i.e. the value being
> assigned to timeleft) --- if that works for you too, it seems pretty
> harmless, so might be appropriate for wider adoption.
Copying to Albert and Michael the contributor for mvsata code.
Regards..
Prafulla . .
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
2011-06-17 7:47 ` Prafulla Wadaskar
@ 2011-06-17 8:29 ` Alexei Ozhigov
2011-06-18 5:52 ` Albert ARIBAUD
0 siblings, 1 reply; 11+ messages in thread
From: Alexei Ozhigov @ 2011-06-17 8:29 UTC (permalink / raw)
To: u-boot
2011/6/17 Prafulla Wadaskar <prafulla@marvell.com>:
>
>
>> -----Original Message-----
>> From: Philip Hands [mailto:phil at hands.com]
>> Sent: Friday, June 17, 2011 1:33 AM
>> To: Alexei Ozhigov
>> Cc: Prafulla Wadaskar; u-boot at lists.denx.de; Prabhanjan Sarnaik; Ashish
>> Karkare
>> Subject: Re: [U-Boot] OpenRD Ultimate SATA & SD
>>
>> 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 :-(
>>
>> So, I've no idea if that's really related to what's going on, because
>> I've now gone as far as reducing the timeout to 5ms and it's _still_
>> working fine, so perhaps some part of the SATA subsystem was in a state
>> that was somehow reset by waiting a bit longer for the startup once, and
>> that's somehow "fixed" it.
>>
>> It is still working despite powering down the machine for a while, so
>> I'm guessing whatever changed is something to do with the state of the
>> hard drive.
>>
>> Sadly that means that I've now lost the ability to test this, since
>> trying any of the versions that were previously failing now work.
>>
>> Anyway, Alexei, try increasing the timeout (i.e. the value being
>> assigned to timeleft) --- if that works for you too, it seems pretty
>> harmless, so might be appropriate for wider adoption.
I have already tried longer timeouts for timeleft and it does not help.
Also with timeout circumvention the SATA flash card I was hoping to
boot from (Transcend TS1GSDOM22V) is identified as follows:
Bus 0: OK Bus 1: OK
Device 0: Model: TRANSCEND Firm: 20080128 Ser#: 20080407 00000005
Type: Hard Disk
Capacity: 955.8 MB = 0.9 GB (1957536 x 512)
IDE read: device 0 not ready
IDE read: device 0 not ready
Device 1: Model: Firm: Ser#:
Type: Hard Disk
Capacity: not available
And then the card cannot be read. First attempt shows "OK" although
the data written to memory are wrong, next attempts result in "device
0 not ready". On the other hand, Linux (Debian ARM port) does not
recognize the card either. So if this problem is not related to
improper initialization, the question is how SATA flash differs from
regular SATA drives with respect to SATA controller in 88F6281 and if
it is actually possible to work with SATA flash on OpenRD.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
2011-06-17 8:29 ` Alexei Ozhigov
@ 2011-06-18 5:52 ` Albert ARIBAUD
2011-06-20 9:30 ` Alexei Ozhigov
0 siblings, 1 reply; 11+ messages in thread
From: Albert ARIBAUD @ 2011-06-18 5:52 UTC (permalink / raw)
To: u-boot
Hi,
Le 17/06/2011 10:29, Alexei Ozhigov a ?crit :
> 2011/6/17 Prafulla Wadaskar<prafulla@marvell.com>:
>>
>>
>>> -----Original Message-----
>>> From: Philip Hands [mailto:phil at hands.com]
>>> Sent: Friday, June 17, 2011 1:33 AM
>>> To: Alexei Ozhigov
>>> Cc: Prafulla Wadaskar; u-boot at lists.denx.de; Prabhanjan Sarnaik; Ashish
>>> Karkare
>>> Subject: Re: [U-Boot] OpenRD Ultimate SATA& SD
>>>
>>> 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 :-(
>>>
>>> So, I've no idea if that's really related to what's going on, because
>>> I've now gone as far as reducing the timeout to 5ms and it's _still_
>>> working fine, so perhaps some part of the SATA subsystem was in a state
>>> that was somehow reset by waiting a bit longer for the startup once, and
>>> that's somehow "fixed" it.
>>>
>>> It is still working despite powering down the machine for a while, so
>>> I'm guessing whatever changed is something to do with the state of the
>>> hard drive.
>>>
>>> Sadly that means that I've now lost the ability to test this, since
>>> trying any of the versions that were previously failing now work.
>>>
>>> Anyway, Alexei, try increasing the timeout (i.e. the value being
>>> assigned to timeleft) --- if that works for you too, it seems pretty
>>> harmless, so might be appropriate for wider adoption.
>
> I have already tried longer timeouts for timeleft and it does not help.
>
> Also with timeout circumvention the SATA flash card I was hoping to
> boot from (Transcend TS1GSDOM22V) is identified as follows:
>
> Bus 0: OK Bus 1: OK
> Device 0: Model: TRANSCEND Firm: 20080128 Ser#: 20080407 00000005
> Type: Hard Disk
> Capacity: 955.8 MB = 0.9 GB (1957536 x 512)
> IDE read: device 0 not ready
> IDE read: device 0 not ready
> Device 1: Model: Firm: Ser#:
> Type: Hard Disk
> Capacity: not available
>
> And then the card cannot be read. First attempt shows "OK" although
> the data written to memory are wrong, next attempts result in "device
> 0 not ready". On the other hand, Linux (Debian ARM port) does not
> recognize the card either. So if this problem is not related to
> improper initialization, the question is how SATA flash differs from
> regular SATA drives with respect to SATA controller in 88F6281 and if
> it is actually possible to work with SATA flash on OpenRD.
Can you #define DEBUG at the start of common/cmd_ide.c and rerun the test?
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
2011-06-18 5:52 ` Albert ARIBAUD
@ 2011-06-20 9:30 ` Alexei Ozhigov
2011-07-02 6:26 ` Albert ARIBAUD
0 siblings, 1 reply; 11+ messages in thread
From: Alexei Ozhigov @ 2011-06-20 9:30 UTC (permalink / raw)
To: u-boot
2011/6/18 Albert ARIBAUD <albert.u.boot@aribaud.net>:
> Hi,
>
> Le 17/06/2011 10:29, Alexei Ozhigov a ?crit :
>>
>> 2011/6/17 Prafulla Wadaskar<prafulla@marvell.com>:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Philip Hands [mailto:phil at hands.com]
>>>> Sent: Friday, June 17, 2011 1:33 AM
>>>> To: Alexei Ozhigov
>>>> Cc: Prafulla Wadaskar; u-boot at lists.denx.de; Prabhanjan Sarnaik; Ashish
>>>> Karkare
>>>> Subject: Re: [U-Boot] OpenRD Ultimate SATA& ?SD
>>>>
>>>> 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 :-(
>>>>
>>>> So, I've no idea if that's really related to what's going on, because
>>>> I've now gone as far as reducing the timeout to 5ms and it's _still_
>>>> working fine, so perhaps some part of the SATA subsystem was in a state
>>>> that was somehow reset by waiting a bit longer for the startup once, and
>>>> that's somehow "fixed" it.
>>>>
>>>> It is still working despite powering down the machine for a while, so
>>>> I'm guessing whatever changed is something to do with the state of the
>>>> hard drive.
>>>>
>>>> Sadly that means that I've now lost the ability to test this, since
>>>> trying any of the versions that were previously failing now work.
>>>>
>>>> Anyway, Alexei, try increasing the timeout (i.e. the value being
>>>> assigned to timeleft) --- if that works for you too, it seems pretty
>>>> harmless, so might be appropriate for wider adoption.
>>
>> I have already tried longer timeouts for timeleft and it does not help.
>>
>> Also with timeout circumvention the SATA flash card I was hoping to
>> boot from (Transcend TS1GSDOM22V) is identified as follows:
>>
>> Bus 0: OK Bus 1: OK
>> ? Device 0: Model: TRANSCEND ?Firm: 20080128 Ser#: 20080407 ? ?00000005
>> ? ? ? ? ? ? Type: Hard Disk
>> ? ? ? ? ? ? Capacity: 955.8 MB = 0.9 GB (1957536 x 512)
>> IDE read: device 0 not ready
>> IDE read: device 0 not ready
>> ? Device 1: Model: ?Firm: ?Ser#:
>> ? ? ? ? ? ? Type: Hard Disk
>> ? ? ? ? ? ? Capacity: not available
>>
>> And then the card cannot be read. First attempt shows "OK" although
>> the data written to memory are wrong, next attempts result in "device
>> 0 not ready". On the other hand, Linux (Debian ARM port) does not
>> recognize the card either. So if this problem is not related to
>> improper initialization, the question is how SATA flash differs from
>> regular SATA drives with respect to SATA controller in 88F6281 and if
>> it is actually possible to work with SATA flash on OpenRD.
>
> Can you #define DEBUG at the start of common/cmd_ide.c and rerun the test?
>
> Amicalement,
> --
> Albert.
>
That is what is printed with regular SATA drive:
================================================================
Marvell>> ide reset
Reset IDE: MVSATA_STATUS_TIMEOUT
ide_preinit failed
Bus 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
OK Bus 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0x50
OK
Device 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_outb (dev= 0, port= 0x11c, val= 0xec) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
in input data base for read is f1082100
Model: TOSHIBA MK1637GSX Firm: DL030G Ser#: 97FXT4OUT
Type: Hard Disk
Supports 48-bit addressing
Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
ide_read dev 0 start 100000010, blocks 1FFBAC64 buffer at 10
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
ide_outb (dev= 0, port= 0x11c, val= 0xe5) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
ide_inb (dev= 0, port= 0x108) : @ 0xf1082108 -> 0xff
Powersaving FF
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
ide_outb (dev= 0, port= 0x108, val= 0x01) : @ 0xf1082108
ide_outb (dev= 0, port= 0x10c, val= 0x10) : @ 0xf108210c
ide_outb (dev= 0, port= 0x110, val= 0x00) : @ 0xf1082110
ide_outb (dev= 0, port= 0x114, val= 0x00) : @ 0xf1082114
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_outb (dev= 0, port= 0x11c, val= 0x20) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
...
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
in input data base for read is f1082100
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
ide_read dev 0 start 100000000, blocks 1FE32A78 buffer at 0
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
ide_outb (dev= 0, port= 0x11c, val= 0xe5) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
ide_inb (dev= 0, port= 0x108) : @ 0xf1082108 -> 0xff
Powersaving FF
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
ide_outb (dev= 0, port= 0x108, val= 0x01) : @ 0xf1082108
ide_outb (dev= 0, port= 0x10c, val= 0x00) : @ 0xf108210c
ide_outb (dev= 0, port= 0x110, val= 0x00) : @ 0xf1082110
ide_outb (dev= 0, port= 0x114, val= 0x00) : @ 0xf1082114
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_outb (dev= 0, port= 0x11c, val= 0x20) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
in input data base for read is f1082100
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
Device 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
ide_outb (dev= 1, port= 0x11c, val= 0xec) : @ 0xf108211c
ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0xd0
ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0x00
not available
Marvell>>
====================================================
Now with SATA flash:
====================================================
Marvell>> ide reset
Reset IDE: MVSATA_STATUS_TIMEOUT
ide_preinit failed
Bus 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x80
... (previous string repeated about 15 times)
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
OK Bus 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0x50
OK
Device 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_outb (dev= 0, port= 0x11c, val= 0xec) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
in input data base for read is f1082100
Model: TRANSCEND Firm: 20080128 Ser#: 20080407 00000005
Type: Hard Disk
Capacity: 955.8 MB = 0.9 GB (1957536 x 512)
ide_read dev 0 start 100000010, blocks 1FFBAC64 buffer at 10
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
ide_outb (dev= 0, port= 0x11c, val= 0xe5) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd8
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd8
... (repeated for about 1 min.)
IDE read: device 0 not ready
ide_read dev 0 start 100000000, blocks 1FE32A78 buffer at 0
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd8
... (repeated for about 1 min.)
IDE read: device 0 not ready
Device 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
ide_outb (dev= 1, port= 0x11c, val= 0xec) : @ 0xf108211c
ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0xd8
... (repeated for about 1 min.)
in input data base for read is f1082100
Model: Firm: Ser#:
Type: Hard Disk
Capacity: not available
Marvell>>
Reset IDE: MVSATA_STATUS_TIMEOUT
ide_preinit failed
Bus 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x80
... (repeated about 15 times)
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
OK Bus 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0x50
OK
Device 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_outb (dev= 0, port= 0x11c, val= 0xec) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
in input data base for read is f1082100
Model: TRANSCEND Firm: 20080128 Ser#: 20080407 00000005
Type: Hard Disk
Capacity: 955.8 MB = 0.9 GB (1957536 x 512)
ide_read dev 0 start 100000010, blocks 1FFBAC64 buffer at 10
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
ide_outb (dev= 0, port= 0x11c, val= 0xe5) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd8
... (repeated for about 1 min.)
IDE read: device 0 not ready
ide_read dev 0 start 100000000, blocks 1FE32A78 buffer at 0
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd8
... (repeated for about 1 min.)
IDE read: device 0 not ready
Device 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
ide_outb (dev= 1, port= 0x11c, val= 0xec) : @ 0xf108211c
ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0xd8
... (repeated for about 1 min.)
in input data base for read is f1082100
Model: Firm: Ser#:
Type: Hard Disk
Capacity: not available
Marvell>>
Reset IDE: MVSATA_STATUS_TIMEOUT
ide_preinit failed
Bus 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x80
... (repeated about 15 times)
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
OK Bus 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0x50
OK
Device 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_outb (dev= 0, port= 0x11c, val= 0xec) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
in input data base for read is f1082100
Model: TRANSCEND Firm: 20080128 Ser#: 20080407 00000005
Type: Hard Disk
Capacity: 955.8 MB = 0.9 GB (1957536 x 512)
ide_read dev 0 start 100000010, blocks 1FFBAC64 buffer at 10
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
ide_outb (dev= 0, port= 0x11c, val= 0xe5) : @ 0xf108211c
ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd8
... (repeated for about 1 min.)
IDE read: device 0 not ready
ide_read dev 0 start 100000000, blocks 1FE32A78 buffer at 0
ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
... (repeated for about 1 min.)
IDE read: device 0 not ready
Device 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
ide_outb (dev= 1, port= 0x11c, val= 0xec) : @ 0xf108211c
... (repeated for about 1 min.)
in input data base for read is f1082100
Model: Firm: Ser#:
Type: Hard Disk
Capacity: not available
Marvell>>
================================================================
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
2011-06-20 9:30 ` Alexei Ozhigov
@ 2011-07-02 6:26 ` Albert ARIBAUD
0 siblings, 0 replies; 11+ messages in thread
From: Albert ARIBAUD @ 2011-07-02 6:26 UTC (permalink / raw)
To: u-boot
Hi Alexei,
(sorry for missing that reply)
Le 20/06/2011 11:30, Alexei Ozhigov a ?crit :
> 2011/6/18 Albert ARIBAUD<albert.u.boot@aribaud.net>:
>> Hi,
>>
>> Le 17/06/2011 10:29, Alexei Ozhigov a ?crit :
>>>
>>> 2011/6/17 Prafulla Wadaskar<prafulla@marvell.com>:
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Philip Hands [mailto:phil at hands.com]
>>>>> Sent: Friday, June 17, 2011 1:33 AM
>>>>> To: Alexei Ozhigov
>>>>> Cc: Prafulla Wadaskar; u-boot at lists.denx.de; Prabhanjan Sarnaik; Ashish
>>>>> Karkare
>>>>> Subject: Re: [U-Boot] OpenRD Ultimate SATA& SD
>>>>>
>>>>> 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 :-(
>>>>>
>>>>> So, I've no idea if that's really related to what's going on, because
>>>>> I've now gone as far as reducing the timeout to 5ms and it's _still_
>>>>> working fine, so perhaps some part of the SATA subsystem was in a state
>>>>> that was somehow reset by waiting a bit longer for the startup once, and
>>>>> that's somehow "fixed" it.
>>>>>
>>>>> It is still working despite powering down the machine for a while, so
>>>>> I'm guessing whatever changed is something to do with the state of the
>>>>> hard drive.
>>>>>
>>>>> Sadly that means that I've now lost the ability to test this, since
>>>>> trying any of the versions that were previously failing now work.
>>>>>
>>>>> Anyway, Alexei, try increasing the timeout (i.e. the value being
>>>>> assigned to timeleft) --- if that works for you too, it seems pretty
>>>>> harmless, so might be appropriate for wider adoption.
>>>
>>> I have already tried longer timeouts for timeleft and it does not help.
>>>
>>> Also with timeout circumvention the SATA flash card I was hoping to
>>> boot from (Transcend TS1GSDOM22V) is identified as follows:
>>>
>>> Bus 0: OK Bus 1: OK
>>> Device 0: Model: TRANSCEND Firm: 20080128 Ser#: 20080407 00000005
>>> Type: Hard Disk
>>> Capacity: 955.8 MB = 0.9 GB (1957536 x 512)
>>> IDE read: device 0 not ready
>>> IDE read: device 0 not ready
>>> Device 1: Model: Firm: Ser#:
>>> Type: Hard Disk
>>> Capacity: not available
>>>
>>> And then the card cannot be read. First attempt shows "OK" although
>>> the data written to memory are wrong, next attempts result in "device
>>> 0 not ready". On the other hand, Linux (Debian ARM port) does not
>>> recognize the card either. So if this problem is not related to
>>> improper initialization, the question is how SATA flash differs from
>>> regular SATA drives with respect to SATA controller in 88F6281 and if
>>> it is actually possible to work with SATA flash on OpenRD.
>>
>> Can you #define DEBUG at the start of common/cmd_ide.c and rerun the test?
>>
>> Amicalement,
>> --
>> Albert.
>>
>
>
> That is what is printed with regular SATA drive:
>
> ================================================================
> Marvell>> ide reset
>
> Reset IDE: MVSATA_STATUS_TIMEOUT
> ide_preinit failed
> Bus 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
> OK Bus 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
> ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0x50
> OK
> Device 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_outb (dev= 0, port= 0x11c, val= 0xec) : @ 0xf108211c
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
> in input data base for read is f1082100
> Model: TOSHIBA MK1637GSX Firm: DL030G Ser#: 97FXT4OUT
> Type: Hard Disk
> Supports 48-bit addressing
> Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
> ide_read dev 0 start 100000010, blocks 1FFBAC64 buffer at 10
> ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
> ide_outb (dev= 0, port= 0x11c, val= 0xe5) : @ 0xf108211c
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
> ide_inb (dev= 0, port= 0x108) : @ 0xf1082108 -> 0xff
> Powersaving FF
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
> ide_outb (dev= 0, port= 0x108, val= 0x01) : @ 0xf1082108
> ide_outb (dev= 0, port= 0x10c, val= 0x10) : @ 0xf108210c
> ide_outb (dev= 0, port= 0x110, val= 0x00) : @ 0xf1082110
> ide_outb (dev= 0, port= 0x114, val= 0x00) : @ 0xf1082114
> ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_outb (dev= 0, port= 0x11c, val= 0x20) : @ 0xf108211c
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
> ...
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
> in input data base for read is f1082100
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
> ide_read dev 0 start 100000000, blocks 1FE32A78 buffer at 0
> ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
> ide_outb (dev= 0, port= 0x11c, val= 0xe5) : @ 0xf108211c
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
> ide_inb (dev= 0, port= 0x108) : @ 0xf1082108 -> 0xff
> Powersaving FF
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
> ide_outb (dev= 0, port= 0x108, val= 0x01) : @ 0xf1082108
> ide_outb (dev= 0, port= 0x10c, val= 0x00) : @ 0xf108210c
> ide_outb (dev= 0, port= 0x110, val= 0x00) : @ 0xf1082110
> ide_outb (dev= 0, port= 0x114, val= 0x00) : @ 0xf1082114
> ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_outb (dev= 0, port= 0x11c, val= 0x20) : @ 0xf108211c
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
> in input data base for read is f1082100
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
> Device 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
> ide_outb (dev= 1, port= 0x11c, val= 0xec) : @ 0xf108211c
> ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0xd0
> ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0x00
> not available
> Marvell>>
> ====================================================
>
>
> Now with SATA flash:
>
> ====================================================
> Marvell>> ide reset
>
> Reset IDE: MVSATA_STATUS_TIMEOUT
> ide_preinit failed
(Too little info in the driver I guess...)
> Bus 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x80
>
> ... (previous string repeated about 15 times)
>
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
Looks like the SATA flash is really slow to respond.
> OK Bus 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
> ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0x50
> OK
> Device 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_outb (dev= 0, port= 0x11c, val= 0xec) : @ 0xf108211c
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd0
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
> in input data base for read is f1082100
> Model: TRANSCEND Firm: 20080128 Ser#: 20080407 00000005
> Type: Hard Disk
> Capacity: 955.8 MB = 0.9 GB (1957536 x 512)
> ide_read dev 0 start 100000010, blocks 1FFBAC64 buffer at 10
> ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x58
> ide_outb (dev= 0, port= 0x11c, val= 0xe5) : @ 0xf108211c
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd8
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd8
>
> ... (repeated for about 1 min.)
Really looks like SATA flash is slow...
> IDE read: device 0 not ready
> ide_read dev 0 start 100000000, blocks 1FE32A78 buffer at 0
> ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0xd8
>
> ... (repeated for about 1 min.)
>
> IDE read: device 0 not ready
> Device 1: ide_outb (dev= 1, port= 0x118, val= 0xf0) : @ 0xf1082118
> ide_outb (dev= 1, port= 0x11c, val= 0xec) : @ 0xf108211c
> ide_inb (dev= 1, port= 0x11c) : @ 0xf108211c -> 0xd8
>
> ... (repeated for about 1 min.)
>
> in input data base for read is f1082100
> Model: Firm: Ser#:
> Type: Hard Disk
> Capacity: not available
> Marvell>>
(I assume this is you hitting ENTER to repeat last command)
> Reset IDE: MVSATA_STATUS_TIMEOUT
> ide_preinit failed
> Bus 0: ide_outb (dev= 0, port= 0x118, val= 0xe0) : @ 0xf1082118
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x80
>
> ... (repeated about 15 times)
>
> ide_inb (dev= 0, port= 0x11c) : @ 0xf108211c -> 0x50
Then it answers again, but slow.
I would have thought of time-out values in the IDE code which would be
ok for actual disks and too short for Flash disks, but it seems that
later the Flash is completely unresponsive until it is reset -- I wonder
if the issue is not with the SATA flash firmware itself. Can you test
with different SATA flash devices, or test the SATA flash with some
other system?
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] OpenRD Ultimate SATA & SD
2011-06-16 20:03 ` Philip Hands
2011-06-17 7:47 ` Prafulla Wadaskar
@ 2011-08-10 13:18 ` Philip Hands
1 sibling, 0 replies; 11+ messages in thread
From: Philip Hands @ 2011-08-10 13:18 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-08-10 13:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox