public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] env_onenand: set ONENAND_MAX_ENV_SIZE to CONFIG_ENV_SIZE
@ 2012-06-13 21:24 David du Colombier
  2012-08-04 16:35 ` David du Colombier
  0 siblings, 1 reply; 3+ messages in thread
From: David du Colombier @ 2012-06-13 21:24 UTC (permalink / raw)
  To: u-boot

This fix prevents env_import() CRC to fail when CONFIG_ENV_SIZE
is not equal to 4096 bytes
It also prevents mtd->read and mtd->write to be incomplete when
the environment is larger than 4096 bytes.

Signed-off-by: David du Colombier <0intro@gmail.com>
---
 common/env_onenand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/env_onenand.c b/common/env_onenand.c
index 7197ab6..da35071 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -39,7 +39,7 @@
 
 char *env_name_spec = "OneNAND";
 
-#define ONENAND_MAX_ENV_SIZE	4096
+#define ONENAND_MAX_ENV_SIZE	CONFIG_ENV_SIZE
 #define ONENAND_ENV_SIZE(mtd)	(ONENAND_MAX_ENV_SIZE - ENV_HEADER_SIZE)
 
 DECLARE_GLOBAL_DATA_PTR;
-- 
1.7.6.5

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

* [U-Boot] [PATCH] env_onenand: set ONENAND_MAX_ENV_SIZE to CONFIG_ENV_SIZE
  2012-06-13 21:24 [U-Boot] [PATCH] env_onenand: set ONENAND_MAX_ENV_SIZE to CONFIG_ENV_SIZE David du Colombier
@ 2012-08-04 16:35 ` David du Colombier
  2012-08-06  9:07   ` Lukasz Majewski
  0 siblings, 1 reply; 3+ messages in thread
From: David du Colombier @ 2012-08-04 16:35 UTC (permalink / raw)
  To: u-boot

> This fix prevents env_import() CRC to fail when CONFIG_ENV_SIZE
> is not equal to 4096 bytes
> It also prevents mtd->read and mtd->write to be incomplete when
> the environment is larger than 4096 bytes.
> 
> Signed-off-by: David du Colombier <0intro@gmail.com>
> ---
>  common/env_onenand.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/common/env_onenand.c b/common/env_onenand.c
> index 7197ab6..da35071 100644
> --- a/common/env_onenand.c
> +++ b/common/env_onenand.c
> @@ -39,7 +39,7 @@
>  
>  char *env_name_spec = "OneNAND";
>  
> -#define ONENAND_MAX_ENV_SIZE	4096
> +#define ONENAND_MAX_ENV_SIZE	CONFIG_ENV_SIZE
>  #define ONENAND_ENV_SIZE(mtd)	(ONENAND_MAX_ENV_SIZE -
> ENV_HEADER_SIZE) 
>  DECLARE_GLOBAL_DATA_PTR;

Could you please take a look? It fixes environment
saving and restoring on IGEPv2.

Thanks.

-- 
David du Colombier

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

* [U-Boot] [PATCH] env_onenand: set ONENAND_MAX_ENV_SIZE to CONFIG_ENV_SIZE
  2012-08-04 16:35 ` David du Colombier
@ 2012-08-06  9:07   ` Lukasz Majewski
  0 siblings, 0 replies; 3+ messages in thread
From: Lukasz Majewski @ 2012-08-06  9:07 UTC (permalink / raw)
  To: u-boot

Dear David du Colombier,

> > This fix prevents env_import() CRC to fail when CONFIG_ENV_SIZE
> > is not equal to 4096 bytes
> > It also prevents mtd->read and mtd->write to be incomplete when
> > the environment is larger than 4096 bytes.
> > 
> > Signed-off-by: David du Colombier <0intro@gmail.com>
> > ---
> >  common/env_onenand.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/common/env_onenand.c b/common/env_onenand.c
> > index 7197ab6..da35071 100644
> > --- a/common/env_onenand.c
> > +++ b/common/env_onenand.c
> > @@ -39,7 +39,7 @@
> >  
> >  char *env_name_spec = "OneNAND";
> >  
> > -#define ONENAND_MAX_ENV_SIZE	4096
> > +#define ONENAND_MAX_ENV_SIZE	CONFIG_ENV_SIZE
> >  #define ONENAND_ENV_SIZE(mtd)	(ONENAND_MAX_ENV_SIZE -
> > ENV_HEADER_SIZE) 
> >  DECLARE_GLOBAL_DATA_PTR;
> 
> Could you please take a look? It fixes environment
> saving and restoring on IGEPv2.
> 
> Thanks.
> 

Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: S5PC110 GONI

Applied to u-boot-onenand repository,


-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center | Linux Platform Group

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

end of thread, other threads:[~2012-08-06  9:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-13 21:24 [U-Boot] [PATCH] env_onenand: set ONENAND_MAX_ENV_SIZE to CONFIG_ENV_SIZE David du Colombier
2012-08-04 16:35 ` David du Colombier
2012-08-06  9:07   ` Lukasz Majewski

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