u-boot-brain/drivers/mtd
Richard Weinberger f82290afc8 mtd: ubi: Fix worker handling
Fixes a bug found on thuban boards, which were for 2 years in
a long-term test with varying temperatures. They showed
problems in u-boot when attaching the ubi partition:

U-Boot# run flash_self_test
Booting from nand
set A...
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
data abort
pc : [<87f97c3c>]          lr : [<87f97c28>]
reloc pc : [<8012cc3c>]    lr : [<8012cc28>]
sp : 85f686e8  ip : 00000020     fp : 000001f7
r10: 8605ce40  r9 : 85f68ef8     r8 : 0001f000
r7 : 00000001  r6 : 00000006     r5 : 0001f000  r4 : 85f6ecc0
r3 : 00000000  r2 : 44e35000     r1 : 87fcbcd4  r0 : 87fc755b
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

Reason is, that accidentially the U-Boot implementation
from __schedule_ubi_work() did not check the flag
ubi->thread_enabled and started with wearleveling work,
but ubi did not have setup all structures at this point
and crashes.

Solve this problem by splitting work scheduling and processing.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Heiko Schocher <hs@denx.de>
2018-02-19 08:22:58 +01:00
..
nand Convert CONFIG_APBH_DMA et al to Kconfig 2018-02-08 12:48:11 -05:00
onenand mtd: replace MTDDEBUG() with pr_debug() 2017-10-23 14:07:26 -04:00
spi sf_probe: Merge spi_flash_probe_tail into spi_flash_probe 2018-01-24 12:04:08 +05:30
ubi mtd: ubi: Fix worker handling 2018-02-19 08:22:58 +01:00
ubispl spl: Lightweight UBI and UBI fastmap support 2016-07-22 09:53:00 -04:00
altera_qspi.c fdt: Rename a few functions in fdt_support 2017-06-01 07:03:11 -06:00
cfi_flash.c cfi_flash: Always define cfi_flash_num_flash_banks 2018-01-29 07:48:59 +01:00
cfi_mtd.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
ftsmc020.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
jedec_flash.c mtd: Handle 29LV800BT 2014-11-19 08:48:41 +01:00
Kconfig flash: complete CONFIG_SYS_NO_FLASH move with renaming 2017-02-12 14:30:25 -05:00
Makefile Drop CONFIG_HAS_DATAFLASH 2017-10-16 09:42:51 -04:00
mtd_uboot.c mtd: uboot: Add meaningful error message 2015-11-12 13:17:28 -05:00
mtd-uclass.c dm: implement a MTD uclass 2015-11-12 08:26:58 +08:00
mtdconcat.c kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
mtdcore.c mtd: add mtd_ooblayout_xxx() helper functions 2017-11-29 00:28:58 +09:00
mtdcore.h mtd, ubi, ubifs: resync with Linux-3.14 2014-08-25 19:25:55 -04:00
mtdpart.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
mw_eeprom.c Update i386 code (sc520_cdp) 2008-09-09 11:48:53 +02:00
pic32_flash.c flash: Fix spelling of "ERR_TIMOUT" 2018-01-29 07:48:59 +01:00
st_smi.c flash: complete CONFIG_SYS_NO_FLASH move with renaming 2017-02-12 14:30:25 -05:00
stm32_flash.c mtd: stm32: use parameter instead of default value 2017-07-10 14:26:05 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00