summaryrefslogtreecommitdiffstats
path: root/common/env_sf.c
Commit message (Collapse)AuthorAgeFilesLines
* add redundant environment for env_sf.cWolfgang Wegner2010-06-301-0/+232
| | | | | | | | | | | | | | | | | | | | This patch adds redundant environment for environment in SPI flash. I took env_flash.c as an example and slightly modified it. Apart from adapting things to SF, I also slightly changed the decision logic to use area 2 as a default in case the flags are wrong because not having a default path worried me. I did not add a section for CONFIG_ENV_IS_IN_SPI_FLASH in environment.h because I did not understand if this is desired and/or needed. So to use the feature, one has to set CONFIG_ENV_OFFSET_REDUND _and_ CONFIG_SYS_REDUNDAND_ENVIRONMENT. I checked it by powering off my board several times during flash erase or write, because I do not know if there are other stress test scenarios. Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* env: kill off default_environment_sizeMike Frysinger2009-08-091-11/+1
| | | | | | | | | 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>
* env_sf: support embedded environmentsMike Frysinger2008-12-161-5/+36
| | | | | | | | | | | | 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>
* rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD2008-09-101-17/+17
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* env_sf: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-09-101-5/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rename CFG_ENV_IS_IN_SPI_FLASH in CONFIG_ENV_IS_IN_SPI_FLASHJean-Christophe PLAGNIOL-VILLARD2008-09-101-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Change CFG_ENV_SIZE to CFG_ENV_SECT_SIZE for SPI sector eraseTsiChung Liew2008-08-141-1/+9
| | | | | | | | | | 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>
* Add support for environment in SPI flashHaavard Skinnemoen2008-06-031-0/+131
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>
OpenPOWER on IntegriCloud