From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V5 4/4] edminiv2: add mvsata_ide and cmd_ide support
Date: Wed, 04 Aug 2010 22:03:37 +0200 [thread overview]
Message-ID: <4C59C799.7040508@free.fr> (raw)
In-Reply-To: <4C591584.4020709@free.fr>
Le 04/08/2010 09:23, Albert ARIBAUD a ?crit :
> Le 04/08/2010 08:08, Prafulla Wadaskar a ?crit :
>> 3. Instead of adding fixed 41/50 usec delay between the writes to
>> Scontrol It would be good if you can check/poll some status bit
>> associated with IDE controller, this will make mvsata driver rock
>> solid on any platform.
>
> I've looked up the marvell kirkwood and orion docs for such a control
> bit but found none. I'll look it up again, however it might help if
> you can find someone inside Marvell who would, and could, provide the
> info.
I think I've found out how it works.
I initially thought the DET field in SControl was a sort of reset line,
and that writing a 1 would put the controller in continuous reset and
writing a 0 to put it out of reset.
But actually, DET is a command field : a write of 1 starts the reset
sequence immediately: the DET field of the SStatus register will go from
0 to 3 (possibly passing through 1).
Then you can set SControl's DET back to 0 so that you can use the port.
Thus the init sequence becomes: write 3 to SControl's IPM and 1 to DET,
read SStatus until its DET field is 3, write 0 to SControl's DET.
However I'll keep a timeout value in the status read loop, because you
can't expect SStatus to become 3: it could stay 0 if no drive is
connected, for instance. If I did not keep a timeout, u-boot would
freeze. :/
Amicalement,
--
Albert.
next prev parent reply other threads:[~2010-08-04 20:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 12:02 [U-Boot] [PATCH V5 1/4] ide: add configuration CONFIG_IDE_SWAP_IO Albert Aribaud
2010-07-13 12:02 ` [U-Boot] [PATCH V5 2/4] ide: add mvsata_ide driver Albert Aribaud
2010-07-13 12:02 ` [U-Boot] [PATCH V5 3/4] cmd_ide: add support for orion5x Albert Aribaud
2010-07-13 12:02 ` [U-Boot] [PATCH V5 4/4] edminiv2: add mvsata_ide and cmd_ide support Albert Aribaud
2010-07-19 7:31 ` Prafulla Wadaskar
2010-07-21 10:26 ` Prafulla Wadaskar
2010-07-23 10:50 ` Albert ARIBAUD
2010-08-01 16:48 ` Prafulla Wadaskar
2010-08-01 17:34 ` Albert ARIBAUD
2010-08-02 3:35 ` Prafulla Wadaskar
2010-08-02 6:13 ` Albert ARIBAUD
2010-08-03 12:01 ` Albert ARIBAUD
2010-08-03 12:10 ` Prafulla Wadaskar
2010-08-04 6:08 ` Prafulla Wadaskar
2010-08-04 7:23 ` Albert ARIBAUD
2010-08-04 20:03 ` Albert ARIBAUD [this message]
2010-08-05 5:23 ` Prafulla Wadaskar
2010-08-04 20:35 ` Albert ARIBAUD
2010-08-05 5:27 ` Prafulla Wadaskar
2010-08-05 12:35 ` Albert ARIBAUD
2010-08-07 21:15 ` Wolfgang Denk
2010-07-21 10:17 ` [U-Boot] [PATCH V5 3/4] cmd_ide: add support for orion5x Prafulla Wadaskar
2010-07-21 10:16 ` [U-Boot] [PATCH V5 2/4] ide: add mvsata_ide driver Prafulla Wadaskar
2010-07-21 17:04 ` Albert ARIBAUD
2010-07-14 15:03 ` [U-Boot] [PATCH V5 1/4] ide: add configuration CONFIG_IDE_SWAP_IO Albert ARIBAUD
2010-07-20 13:43 ` Wolfgang Denk
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=4C59C799.7040508@free.fr \
--to=albert.aribaud@free.fr \
--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