diff mbox

[U-Boot,2/2] microblaze: move ENV onto top of flash

Message ID 1341153878-13253-2-git-send-email-linz@li-pro.net
State Rejected
Delegated to: Michal Simek
Headers show

Commit Message

Stephan Linz July 1, 2012, 2:44 p.m. UTC
On Microblaze systems with BPI configuration from CFI flash
the first 1-10 MB will occupied by the FPGA configuration
data (BIN file). So we can not use this area for the U-Boot
environment.

In most of all FPGA configuration cases the upper sector in
flash memory will be free for individuell usage.

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 include/configs/microblaze-generic.h |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

Comments

Michal Simek July 2, 2012, 5:52 a.m. UTC | #1
2012/7/1 Stephan Linz <linz@li-pro.net>:
> On Microblaze systems with BPI configuration from CFI flash
> the first 1-10 MB will occupied by the FPGA configuration
> data (BIN file). So we can not use this area for the U-Boot
> environment.
>
> In most of all FPGA configuration cases the upper sector in
> flash memory will be free for individuell usage.

is it based on any statistic? I don't think so.

>
> Signed-off-by: Stephan Linz <linz@li-pro.net>
> ---
>  include/configs/microblaze-generic.h |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)

nack for this.
One configuration file can't cover all fpga cases.
The reason why there is only one configuration file for microblaze is
that fpga variability.
If you want to use this option just create new board with your configuration
and use it.
Generic microblaze board should be as simple as possible.
I am ok with adding new command/drivers and improving config but I don't want to
support everything because it is not possible.

Thanks,
Michal
Stephan Linz July 2, 2012, 7:36 p.m. UTC | #2
Am Montag, den 02.07.2012, 07:52 +0200 schrieb Michal Simek: 
> 2012/7/1 Stephan Linz <linz@li-pro.net>:
> > On Microblaze systems with BPI configuration from CFI flash
> > the first 1-10 MB will occupied by the FPGA configuration
> > data (BIN file). So we can not use this area for the U-Boot
> > environment.
> >
> > In most of all FPGA configuration cases the upper sector in
> > flash memory will be free for individuell usage.
> 
> is it based on any statistic? I don't think so.

Hi Michal,

yes, there isn't ... you are right ;)

> 
> >
> > Signed-off-by: Stephan Linz <linz@li-pro.net>
> > ---
> >  include/configs/microblaze-generic.h |    8 +++-----
> >  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> nack for this.
> One configuration file can't cover all fpga cases.
> The reason why there is only one configuration file for microblaze is
> that fpga variability.
> If you want to use this option just create new board with your configuration
> and use it.

I can live with that, but the current configuration file defines a
memory hole of 256kB in the first 2 sectors in flash. For what? -- The
environment is placed in the 3rd sector. All other sectors are free for
anything.

I think it would be more plausible if the last sector on top will be
used for environment and all other sectors down to the first would be
free for anything, or not?


br,
Stephan

> Generic microblaze board should be as simple as possible.
> I am ok with adding new command/drivers and improving config but I don't want to
> support everything because it is not possible.
> 
> Thanks,
> Michal
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Michal Simek July 3, 2012, 5:15 a.m. UTC | #3
On 07/02/2012 09:36 PM, Stephan Linz wrote:
> Am Montag, den 02.07.2012, 07:52 +0200 schrieb Michal Simek:
>> 2012/7/1 Stephan Linz<linz@li-pro.net>:
>>> On Microblaze systems with BPI configuration from CFI flash
>>> the first 1-10 MB will occupied by the FPGA configuration
>>> data (BIN file). So we can not use this area for the U-Boot
>>> environment.
>>>
>>> In most of all FPGA configuration cases the upper sector in
>>> flash memory will be free for individuell usage.
>>
>> is it based on any statistic? I don't think so.
>
> Hi Michal,
>
> yes, there isn't ... you are right ;)
>
>>
>>>
>>> Signed-off-by: Stephan Linz<linz@li-pro.net>
>>> ---
>>>   include/configs/microblaze-generic.h |    8 +++-----
>>>   1 files changed, 3 insertions(+), 5 deletions(-)
>>
>> nack for this.
>> One configuration file can't cover all fpga cases.
>> The reason why there is only one configuration file for microblaze is
>> that fpga variability.
>> If you want to use this option just create new board with your configuration
>> and use it.
>
> I can live with that, but the current configuration file defines a
> memory hole of 256kB in the first 2 sectors in flash. For what? -- The
> environment is placed in the 3rd sector. All other sectors are free for
> anything.

For u-boot itself.

Thanks,
Michal
diff mbox

Patch

diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index e20eb08..818435d 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -186,11 +186,9 @@ 
  * CONFIG_ENV_SIZE = SECT_SIZE;		128kB environment store
  *
  * 0x2200_0000	CONFIG_SYS_FLASH_BASE
- *					FREE		256kB
- * 0x2204_0000	CONFIG_ENV_ADDR
- *					ENV_AREA	128kB
- * 0x2206_0000
  *					FREE
+ * 0x227E_0000	CONFIG_ENV_ADDR
+ *					ENV_AREA	128kB
  * 0x2280_0000	CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_SIZE
  *
  */
@@ -219,7 +217,7 @@ 
 /* 128K(one sector) for env */
 #  define CONFIG_ENV_SECT_SIZE	0x20000
 #  define CONFIG_ENV_ADDR \
-			(CONFIG_SYS_FLASH_BASE + (2 * CONFIG_ENV_SECT_SIZE))
+	(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_SIZE - CONFIG_ENV_SECT_SIZE)
 #  define CONFIG_ENV_SIZE	0x20000
 # endif /* !RAMBOOT */
 #else /* !FLASH */