Wolfgang Wegner 7319bcaf8b 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>
2010-06-30 23:47:08 -04:00
..
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2010-06-23 23:24:20 +02:00
2009-06-12 20:47:16 +02:00
2010-01-18 00:44:13 +01:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2010-01-18 00:42:37 +01:00
2009-07-28 22:38:53 +02:00
2009-06-12 20:47:16 +02:00
2010-06-23 23:24:20 +02:00
2009-06-12 20:47:16 +02:00
2010-05-21 22:05:05 +02:00
2009-06-12 20:47:16 +02:00
2009-11-23 00:06:12 +01:00
2010-06-23 23:24:20 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2010-03-21 16:44:04 +01:00
2010-05-21 22:05:05 +02:00
2010-06-23 23:24:20 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-10-07 09:15:26 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2010-06-23 20:50:54 +02:00
2009-10-24 22:44:18 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2009-11-23 00:06:13 +01:00
2009-07-23 21:33:02 +02:00
2009-07-09 13:04:25 +02:00
2009-06-12 20:47:16 +02:00
2009-06-12 20:47:16 +02:00
2010-03-12 23:06:04 +01:00
2009-06-12 20:47:16 +02:00
2010-06-23 23:24:20 +02:00
2003-06-27 21:31:46 +00:00
2010-06-23 23:24:20 +02:00
2010-03-12 23:06:04 +01:00
2010-06-23 23:24:20 +02:00
2009-12-02 22:53:51 +01:00
2008-10-18 21:54:03 +02:00
2010-06-29 21:12:43 +02:00
2010-06-29 22:24:48 +02:00
2010-05-28 10:56:04 -04:00
2010-01-18 00:23:00 +01:00
2010-04-21 23:42:38 +02:00
2010-03-24 11:23:15 +01:00
2010-06-23 23:24:20 +02:00
2010-01-18 00:44:13 +01:00
2002-08-17 09:36:01 +00:00
2010-05-06 00:16:46 +02:00
2008-10-18 21:54:03 +02:00
2010-04-08 21:40:00 +02:00