]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
env_sf: support embedded environments
authorMike Frysinger <vapier@gentoo.org>
Thu, 11 Dec 2008 11:23:37 +0000 (06:23 -0500)
committerWolfgang Denk <wd@denx.de>
Mon, 15 Dec 2008 23:47:10 +0000 (00:47 +0100)
commit5b3375ac8c36c29c87abb132fede0509eb21e5c9
treef44ea206e43139a95a3f4340409b7e2c6016dac8
parentecf5f077c8e77454f532eaac3e3afb7cfc48c62d
env_sf: support embedded environments

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