
Hi Stefan,
Sure I will post it to mailing list and try your suggestions.
Thanks and Regards Srinath
On 12/10/07, Stefan Roese sr@denx.de wrote:
Hi Srinath,
one note in front. Please send such questions to the mailing list. So a lot of other talented people have to opportunity answer our questions.
On Monday 10 December 2007, Srinath Iyengar wrote:
I have an arm based board which can have one of the following serial flashes
8 MB flash with 64K sector size
16 MB flash with 64K sector size 16 MB flash with 265K sector size
*My objective is to have a single u-boot binary (Image) which can
handle
any of these flashes.*
Should be possible with the CFI driver.
Currently I have found the means to get it work with compile time option
to
differentiate between 64KB and 256KB sector size of Flash.
I am finding it difficult to fix the issues with CFG_FLASH_SECT_SIZE and CFG_ENV_SECT_SIZE or CFG_ENV_SIZE values dynamically.
Correct. Currently this is not supported.
(There should be some means by which I can determine
CFG_FLASH_SECT_SIZE,
eventually CFG_ENV_SECT_SIZE and CFG_ENV_SIZE after knowing the details about FLASH (probe).Even though we are filling flash_info structure data after probing about flash we still have to
live
with compile time option for finding CFG_FLASH_SECT_SIZE, CFG_ENV_SECT_SIZE
and
dependent Macros)
Yes, a dynamic sector size configuration would be good.
Please let me know if my requirement is conflating with U-boot design objectives in handling flash and any suggestions to fix this issue.
An easy way to handle all your flash chips in one image (without this dynamic sector size detection) would be, if you set the CFG_ENV_SECT_SIZE to the max size you can have, that is 256k. You should set CFG_ENV_SIZE to a smaller size, something like 16k, so that saving the environment doesn't take too long.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================