Re: [U-Boot] Remove global variable env_t *env_ptr ?

2017-04-04 Thread Joakim Tjernlund
On Tue, 2017-04-04 at 13:27 +0200, Wolfgang Denk wrote: > Dear Joakim, > > In message <1491302640.30240.1.ca...@infinera.com> you wrote: > > > > > That is my exact question - when would this happen? Flash sectors > > > do now wander around in memory or change size :-) > > > > No, but they

Re: [U-Boot] Remove global variable env_t *env_ptr ?

2017-04-04 Thread Wolfgang Denk
Dear Joakim, In message <1491302640.30240.1.ca...@infinera.com> you wrote: > > > That is my exact question - when would this happen? Flash sectors > > do now wander around in memory or change size :-) > > No, but they happens when you are forced to update you HW with new type of > flashes >

Re: [U-Boot] Remove global variable env_t *env_ptr ?

2017-04-04 Thread Joakim Tjernlund
On Tue, 2017-04-04 at 12:31 +0200, Wolfgang Denk wrote: > Dear Joakim, > > In message <1491301459.28343.1.ca...@infinera.com> you wrote: > > > > Use case is when CONFIG_ENV_SECT_SIZE and/or CONFIG_ENV_ADDR are non > > constants. > > That is my exact question - when would this happen? Flash

Re: [U-Boot] Remove global variable env_t *env_ptr ?

2017-04-04 Thread Wolfgang Denk
Dear Joakim, In message <1491301459.28343.1.ca...@infinera.com> you wrote: > > Use case is when CONFIG_ENV_SECT_SIZE and/or CONFIG_ENV_ADDR are non > constants. That is my exact question - when would this happen? Flash sectors do now wander around in memory or change size :-) So you attempt

Re: [U-Boot] Remove global variable env_t *env_ptr ?

2017-04-04 Thread Wolfgang Denk
Dear Joakim, In message <1491293863.4177.92.ca...@infinera.com> you wrote: > > After a brief look I think we are good. Let me explain, I am only > making it possible to #define CONFIG_ENV_ADDR, CONFIG_ENV_SECT_SIZE etc. > as non constant data by moving the assignment of flash_addr etc. to

Re: [U-Boot] Remove global variable env_t *env_ptr ?

2017-04-04 Thread Joakim Tjernlund
On Tue, 2017-04-04 at 10:55 +0200, Lukasz Majewski wrote: > Hi Joakim, > > > I am looking at adding support for runtime sizing of CONFIG_ENV_ADDR > > as we need to replace out flash but we don't want to create a new > > u-boot binairy just for this simple change. > > Please correct me if I did

Re: [U-Boot] Remove global variable env_t *env_ptr ?

2017-04-04 Thread Lukasz Majewski
Hi Joakim, > I am looking at adding support for runtime sizing of CONFIG_ENV_ADDR > as we need to replace out flash but we don't want to create a new > u-boot binairy just for this simple change. Please correct me if I did not understand your use case correctly. Other boards have separate

Re: [U-Boot] Remove global variable env_t *env_ptr ?

2017-04-04 Thread Joakim Tjernlund
On Mon, 2017-04-03 at 22:17 +0200, Wolfgang Denk wrote: > Dear Joakim, Dear Wolfgang, > > In message <1491221969.4177.81.ca...@infinera.com> you wrote: > > I am looking at adding support for runtime sizing of CONFIG_ENV_ADDR as > > we need to replace out flash but we don't want to create a new

Re: [U-Boot] Remove global variable env_t *env_ptr ?

2017-04-03 Thread Wolfgang Denk
Dear Joakim, In message <1491221969.4177.81.ca...@infinera.com> you wrote: > I am looking at adding support for runtime sizing of CONFIG_ENV_ADDR as > we need to replace out flash but we don't want to create a new u-boot binairy > just for this simple change. I doubt this will work for

[U-Boot] Remove global variable env_t *env_ptr ?

2017-04-03 Thread Joakim Tjernlund
I am looking at adding support for runtime sizing of CONFIG_ENV_ADDR as we need to replace out flash but we don't want to create a new u-boot binairy just for this simple change. While converting env_flash.c I noted the global variable env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; which cannot be