Hi Kyungmin, Thank you for the comments. Kyungmin Park wrote: >> diff --git a/common/env_onenand.c b/common/env_onenand.c >> --- a/common/env_onenand.c >> +++ b/common/env_onenand.c >> @@ -58,11 +58,14 @@ >> >> void env_relocate_spec(void) >> { >> + struct onenand_chip *this = &onenand_chip; >> unsigned long env_addr; >> int use_default = 0; >> size_t retlen; >> >> env_addr = CONFIG_ENV_ADDR; >> + if (FLEXONENAND(this)) >> + env_addr = CONFIG_ENV_ADDR_FLEX; >> > > Umm do you have more fancy method to determine the environment address > whatever it's OneNAND or not. > We can just double CONFIG_ENV_ADDR for Flex-OneNAND, so CONFIG_ENV_ADDR_FLEX is not needed. Otherwise, we can just set env_addr to 1 block size as bootloader is always limited to block 0. >> int saveenv(void) >> { >> + struct onenand_chip *this = &onenand_chip; >> unsigned long env_addr = CONFIG_ENV_ADDR; >> struct erase_info instr = { >> .callback = NULL, >> @@ -96,6 +100,12 @@ >> size_t retlen; >> >> instr.len = CONFIG_ENV_SIZE; >> + if (FLEXONENAND(this)) { >> + env_addr = CONFIG_ENV_ADDR_FLEX; >> + instr.len = CONFIG_ENV_SIZE_FLEX; >> + instr.len <<= onenand_mtd.eraseregions[0].numblocks == 1 ? >> + 1 : 0; >> + } >> > > Ditto. > I don't get alternative than to use CONFIG_ENV_SIZE_FLEX to store size of environment variables partition. Can you please elaborate.
Regards, Rohit _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot