Re: [U-Boot] [PATCH V2] mvsata_ide: adjust port init sequence

2010-09-07 Thread Albert ARIBAUD
Le 07/09/2010 21:00, Wolfgang Denk a écrit : > Dear Albert ARIBAUD, > > In message<4c867741.6060...@free.fr> you wrote: >> >> I'm a bit lost at the logic of this last sentence. If errors are not >> always represented as negative return values, and especially so in >> U-boot, then what is the ratio

Re: [U-Boot] [PATCH V2] mvsata_ide: adjust port init sequence

2010-09-07 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message <4c867741.6060...@free.fr> you wrote: > > I'm a bit lost at the logic of this last sentence. If errors are not > always represented as negative return values, and especially so in > U-boot, then what is the rationale for supporting a request for > specifically n

Re: [U-Boot] [PATCH V2] mvsata_ide: adjust port init sequence

2010-09-07 Thread Albert ARIBAUD
Le 07/09/2010 16:06, Wolfgang Denk a écrit : >> Negative always represents errors, >> whereas positive may represent some valid return state. > > He. This is _not_quite_ correct. Not in U-Boot, and not in genreal. > > [But your comment asking for a negative return code is valid, of > course.] I'm

Re: [U-Boot] [PATCH V2] mvsata_ide: adjust port init sequence

2010-09-07 Thread Wolfgang Denk
Dear Prafulla Wadaskar, In message you wrote: > > Negative always represents errors, > whereas positive may represent some valid return state. He. This is _not_quite_ correct. Not in U-Boot, and not in genreal. [But your comment asking for a negative return code is valid, of course.] Best re

Re: [U-Boot] [PATCH V2] mvsata_ide: adjust port init sequence

2010-09-07 Thread Prafulla Wadaskar
> -Original Message- > From: Albert ARIBAUD [mailto:albert.arib...@free.fr] > Sent: Tuesday, September 07, 2010 4:53 PM > To: Prafulla Wadaskar > Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare > Subject: Re: [PATCH V2] mvsata_ide: adjust port init sequence > > Le 07/09/20

Re: [U-Boot] [PATCH V2] mvsata_ide: adjust port init sequence

2010-09-07 Thread Albert ARIBAUD
Le 07/09/2010 08:42, Prafulla Wadaskar a écrit : >> diff --git a/drivers/block/mvsata_ide.c b/drivers/block/mvsata_ide.c >> @@ -125,15 +129,17 @@ int ide_preinit(void) >> +return 1; > > How about returning negative values for errors ? Function ide_preinit() is called from cmd_ide.c:i

Re: [U-Boot] [PATCH V2] mvsata_ide: adjust port init sequence

2010-09-07 Thread Sergei Shtylyov
Hello. On 07-09-2010 3:02, Albert Aribaud wrote: > mvsata_ide_initialize_port(): adjust init sequence (SStatus > should be checked only after all writes to SControl) and > return success/failure to ide_preinit(). > Also, as some tests showed init durations in the hundreds > of us, raise the time

Re: [U-Boot] [PATCH V2] mvsata_ide: adjust port init sequence

2010-09-06 Thread Prafulla Wadaskar
> -Original Message- > From: u-boot-boun...@lists.denx.de > [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Albert Aribaud > Sent: Tuesday, September 07, 2010 4:33 AM > To: u-boot@lists.denx.de > Subject: [U-Boot] [PATCH V2] mvsata_ide: adjust

[U-Boot] [PATCH V2] mvsata_ide: adjust port init sequence

2010-09-06 Thread Albert Aribaud
mvsata_ide_initialize_port(): adjust init sequence (SStatus should be checked only after all writes to SControl) and return success/failure to ide_preinit(). Also, as some tests showed init durations in the hundreds of us, raise the time-out to 10 ms to be on the safe side. Signed-off-by: Albert