summaryrefslogtreecommitdiff
path: root/common/env_sf.c
AgeCommit message (Collapse)Author
2009-08-09env: kill off default_environment_sizeMike Frysinger
The only environment type that uses this variable is spi flash, and that is only because it is reimplementing the common set_default_env() function. So fix the spi flash code and kill off the default_environment_size in the process. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-12-16env_sf: support embedded environmentsMike Frysinger
If both CONFIG_ENV_SECT_SIZE and CONFIG_ENV_SIZE are defined, and the sect size is larger than the env size, then it means the env is embedded in a block. So we have to save/restore the part of the sector which is not the environment. Previously, saving the environment in SPI flash in this setup would probably brick the board as the rest of the sector tends to contain actual U-Boot data/code. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-09-10rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10env_sf: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10rename CFG_ENV_IS_IN_SPI_FLASH in CONFIG_ENV_IS_IN_SPI_FLASHJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-14Change CFG_ENV_SIZE to CFG_ENV_SECT_SIZE for SPI sector eraseTsiChung Liew
The CFG_ENV_SIZE is not suitable used for SPI flash erase sector size if CFG_ENV_SIZE is less than CFG_ENV_SECT_SIZE. Add condition check if CFG_ENV_SIZE is larger than CFG_ENV_SECT_SIZE, calculate the right number of sectors for erasing. Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-06-03Add support for environment in SPI flashHaavard Skinnemoen
This is pretty incomplete...it doesn't handle reading the environment before relocation, it doesn't support redundant environment, and it doesn't support embedded environment. But apart from that, it does seem to work. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>