diff options
author | Heiko Schocher <hs@denx.de> | 2016-02-02 11:54:35 +0100 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2016-04-22 11:47:37 +0200 |
commit | 68fc449033732e7eb2aa022f9ef1b292f6871b8c (patch) | |
tree | 2912addfbea8da56958da722cb7ebcfc173e9870 /configs/P1010RDB-PA_36BIT_SDCARD_defconfig | |
parent | ee8b25fa354da7cfaafe0e6781e873c74c29bbad (diff) | |
download | blackbird-obmc-uboot-68fc449033732e7eb2aa022f9ef1b292f6871b8c.tar.gz blackbird-obmc-uboot-68fc449033732e7eb2aa022f9ef1b292f6871b8c.zip |
mtd, ubi: set free_count to zero before walking through erase list
Set free_count to zero before walking through ai->erase list
in wl_init().
As U-Boot has no workqueue/threads, it immediately calls
erase_worker(), which increase for each erased block
free_count. Without this patch, free_count gets after
this initialized to zero in wl_init(), so the free_count
variable always has the maybe wrong value 0.
Detected this behaviour on the dxr2 board, where the
UBI fastmap gets not written when attaching/dettaching
on an empty NAND. It drops instead the error message:
could not find any anchor PEB
With this patch, fastmap gets written on dettach.
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'configs/P1010RDB-PA_36BIT_SDCARD_defconfig')
0 files changed, 0 insertions, 0 deletions