[U-Boot] [PATCH V5 4/4] edminiv2: add mvsata_ide and cmd_ide support

Prafulla Wadaskar prafulla at marvell.com
Thu Aug 5 07:23:54 CEST 2010


 

> -----Original Message-----
> From: Albert ARIBAUD [mailto:albert.aribaud at free.fr] 
> Sent: Thursday, August 05, 2010 1:34 AM
> To: Albert ARIBAUD
> Cc: Prafulla Wadaskar; u-boot at lists.denx.de; Prabhanjan 
> Sarnaik; Ashish Karkare; tanmay.upadhyay at einfochips.com
> Subject: Re: [PATCH V5 4/4] edminiv2: add mvsata_ide and 
> cmd_ide support
> 
> 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. :/

Hi Albert
Good findings....
This would be great improvement with right approach.

Regards..
Prafulla . .



More information about the U-Boot mailing list