summaryrefslogtreecommitdiff
path: root/common/usb_hub.c
diff options
context:
space:
mode:
authorMario Schuknecht <mario.schuknecht@dresearch-fe.de>2015-03-24 08:59:00 +0100
committerTom Rini <trini@konsulko.com>2015-04-07 08:41:10 -0400
commit5e8397dd94a1b55cd7577cdc24f271b71f660e7e (patch)
tree8d78cd49d1bfcbd500929276f063361d7cf024f8 /common/usb_hub.c
parent3419af770ddb6d3d777f651f9eb89479df4623ba (diff)
downloadu-boot-imx-5e8397dd94a1b55cd7577cdc24f271b71f660e7e.zip
u-boot-imx-5e8397dd94a1b55cd7577cdc24f271b71f660e7e.tar.gz
u-boot-imx-5e8397dd94a1b55cd7577cdc24f271b71f660e7e.tar.bz2
env_sf: Fix recovery default
The u-boot environment is redundantly stored in a NOR flash on our boards. Redundant means that there are two places to store the environment. But only one of the two is active. I discovered that on one board the u-boot (env_sf) uses the environment from the second place and the Kernel (fw_printenv) uses the environment from the first place. To decide which is the active environment there is a byte inside the environment. 1 means active and 0 means obsolete. But on that board both environments had have a 1. This can happen if a power loss or reset occurs during writing the environment. In this situation the u-boot (env_sf) implementation uses the second environment as default. But the Kernel (fw_printenv) implementation uses the first environment as default. This commit corrects the default in the u-boot env_sf implementation when a problem was detected. Now the recovery default is the same like in all other environment implementations. E.g. fw_printenv and env_flash. This ensures that u-boot and Kernel use the same environment. Signed-off-by: Mario Schuknecht <mario.schuknecht@dresearch-fe.de>
Diffstat (limited to 'common/usb_hub.c')
0 files changed, 0 insertions, 0 deletions