public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] env_nand: Use nand_read_skip_bad instead of nand_read
@ 2010-11-19 14:45 Steve Sakoman
  0 siblings, 0 replies; 5+ messages in thread
From: Steve Sakoman @ 2010-11-19 14:45 UTC (permalink / raw)
  To: u-boot

Otherwise environment read will fail if correctable errors occur

Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
---

diff --git a/common/env_nand.c b/common/env_nand.c
index 4e8307a..7f6c917 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -297,7 +297,7 @@ int readenv(size_t offset, u_char * buf)
 			offset += blocksize;
 		} else {
 			char_ptr = &buf[amount_loaded];
-			if (nand_read(&nand_info[0], offset, &len, char_ptr))
+			if (nand_read_skip_bad(&nand_info[0], offset, &len, char_ptr))
 				return 1;
 			offset += blocksize;
 			amount_loaded += len;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] env_nand: Use nand_read_skip_bad instead of nand_read
@ 2010-12-03 23:25 Steve Sakoman
  2010-12-05 21:22 ` Paulraj, Sandeep
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Sakoman @ 2010-12-03 23:25 UTC (permalink / raw)
  To: u-boot

The nand-read function returns an error code if correctable errors have occurred.
This is not desirable, since the errors have been corrected!

This patch switches to the nand_read_skip_bad function which does not
return an error code if the errors are correctable.

Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
---

diff --git a/common/env_nand.c b/common/env_nand.c
index 4e8307a..7f6c917 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -297,7 +297,7 @@ int readenv(size_t offset, u_char * buf)
 			offset += blocksize;
 		} else {
 			char_ptr = &buf[amount_loaded];
-			if (nand_read(&nand_info[0], offset, &len, char_ptr))
+			if (nand_read_skip_bad(&nand_info[0], offset, &len, char_ptr))
 				return 1;
 			offset += blocksize;
 			amount_loaded += len;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] env_nand: Use nand_read_skip_bad instead of nand_read
  2010-12-03 23:25 [U-Boot] [PATCH] env_nand: Use nand_read_skip_bad instead of nand_read Steve Sakoman
@ 2010-12-05 21:22 ` Paulraj, Sandeep
  2010-12-06 17:13   ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Paulraj, Sandeep @ 2010-12-05 21:22 UTC (permalink / raw)
  To: u-boot



> The nand-read function returns an error code if correctable errors have
> occurred.
> This is not desirable, since the errors have been corrected!
> 
> This patch switches to the nand_read_skip_bad function which does not
> return an error code if the errors are correctable.
> 
> Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
> ---
> 
> diff --git a/common/env_nand.c b/common/env_nand.c
> index 4e8307a..7f6c917 100644
> --- a/common/env_nand.c
> +++ b/common/env_nand.c
> @@ -297,7 +297,7 @@ int readenv(size_t offset, u_char * buf)
>  			offset += blocksize;
>  		} else {
>  			char_ptr = &buf[amount_loaded];
> -			if (nand_read(&nand_info[0], offset, &len, char_ptr))
> +			if (nand_read_skip_bad(&nand_info[0], offset, &len,
> char_ptr))
>  				return 1;
>  			offset += blocksize;
>  			amount_loaded += len;
> 

Scott,

Can I add this to u-boot-ti?

Regards,
Sandeep

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] env_nand: Use nand_read_skip_bad instead of nand_read
  2010-12-05 21:22 ` Paulraj, Sandeep
@ 2010-12-06 17:13   ` Scott Wood
  2010-12-07  0:30     ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Wood @ 2010-12-06 17:13 UTC (permalink / raw)
  To: u-boot

On Sun, 5 Dec 2010 15:22:25 -0600
"Paulraj, Sandeep" <s-paulraj@ti.com> wrote:

> 
> 
> > The nand-read function returns an error code if correctable errors have
> > occurred.
> > This is not desirable, since the errors have been corrected!
> > 
> > This patch switches to the nand_read_skip_bad function which does not
> > return an error code if the errors are correctable.
> > 
> > Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
> > ---
> > 
> > diff --git a/common/env_nand.c b/common/env_nand.c
> > index 4e8307a..7f6c917 100644
> > --- a/common/env_nand.c
> > +++ b/common/env_nand.c
> > @@ -297,7 +297,7 @@ int readenv(size_t offset, u_char * buf)
> >  			offset += blocksize;
> >  		} else {
> >  			char_ptr = &buf[amount_loaded];
> > -			if (nand_read(&nand_info[0], offset, &len, char_ptr))
> > +			if (nand_read_skip_bad(&nand_info[0], offset, &len,
> > char_ptr))
> >  				return 1;
> >  			offset += blocksize;
> >  			amount_loaded += len;
> > 
> 
> Scott,
> 
> Can I add this to u-boot-ti?

Acked-by: Scott Wood <scottwood@freescale.com>

Sorry about the delay, I'll try to get to the NAND patches soon.  I've
been busy with other things.

-Scott

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] env_nand: Use nand_read_skip_bad instead of nand_read
  2010-12-06 17:13   ` Scott Wood
@ 2010-12-07  0:30     ` Scott Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2010-12-07  0:30 UTC (permalink / raw)
  To: u-boot

On Mon, 6 Dec 2010 11:13:22 -0600
Scott Wood <scottwood@freescale.com> wrote:

> On Sun, 5 Dec 2010 15:22:25 -0600
> "Paulraj, Sandeep" <s-paulraj@ti.com> wrote:
> 
> > 
> > 
> > > The nand-read function returns an error code if correctable errors have
> > > occurred.
> > > This is not desirable, since the errors have been corrected!
> > > 
> > > This patch switches to the nand_read_skip_bad function which does not
> > > return an error code if the errors are correctable.
> > > 
> > > Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
> > > ---
> > > 
> > > diff --git a/common/env_nand.c b/common/env_nand.c
> > > index 4e8307a..7f6c917 100644
> > > --- a/common/env_nand.c
> > > +++ b/common/env_nand.c
> > > @@ -297,7 +297,7 @@ int readenv(size_t offset, u_char * buf)
> > >  			offset += blocksize;
> > >  		} else {
> > >  			char_ptr = &buf[amount_loaded];
> > > -			if (nand_read(&nand_info[0], offset, &len, char_ptr))
> > > +			if (nand_read_skip_bad(&nand_info[0], offset, &len,
> > > char_ptr))
> > >  				return 1;
> > >  			offset += blocksize;
> > >  			amount_loaded += len;
> > > 
> > 
> > Scott,
> > 
> > Can I add this to u-boot-ti?
> 
> Acked-by: Scott Wood <scottwood@freescale.com>
> 
> Sorry about the delay, I'll try to get to the NAND patches soon.  I've
> been busy with other things.

Applied to u-boot-nand-flash.

-Scott

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-07  0:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-03 23:25 [U-Boot] [PATCH] env_nand: Use nand_read_skip_bad instead of nand_read Steve Sakoman
2010-12-05 21:22 ` Paulraj, Sandeep
2010-12-06 17:13   ` Scott Wood
2010-12-07  0:30     ` Scott Wood
  -- strict thread matches above, loose matches on Subject: below --
2010-11-19 14:45 Steve Sakoman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox