]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
add redundant environment for env_sf.c
authorWolfgang Wegner <w.wegner@astro-kom.de>
Fri, 23 Apr 2010 15:22:55 +0000 (17:22 +0200)
committerMike Frysinger <vapier@gentoo.org>
Thu, 1 Jul 2010 03:47:08 +0000 (23:47 -0400)
commit7319bcaf8ba1cddba2e56a722144eafc98868f77
tree8e34694943c898519b29c44d1df5ccc130a6c15b
parent39ddd10b046fb791f47281ffb2100be01909ad72
add redundant environment for env_sf.c

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>
common/env_sf.c