u-boot-brain/drivers/mtd
Boris Brezillon 4a5594fa20 mtd: Don't stop MTD partition creation when it fails on one device
MTD partition creation code is a bit tricky. It tries to figure out
when things have changed (either MTD dev list or mtdparts/mtdids vars)
and when that happens it first deletes all the partitions that had been
previously created and then creates the new ones based on the new
mtdparts/mtdids values.
But before deleting the old partitions, it ensures that none of the
currently registered parts are being used and bails out when that's
not the case. So, we end up in a situation where, if at least one MTD
dev has one of its partitions used by someone (UBI for instance), the
partitions update logic no longer works for other devs.

Rework the code to relax the logic and allow updates of MTD parts on
devices that are not being used (we still refuse to updates parts on
devices who have at least one of their partitions used by someone).

Fixes: 5db66b3aee ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
2018-12-06 00:45:36 +05:30
..
nand mtd: rawnand: pxa3xx: fix 2kiB pages with 8b strength chips layout 2018-11-22 11:38:13 +05:30
onenand mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing 2018-09-20 20:10:49 +05:30
spi mtd: sf: Make sure we don't register the same device twice 2018-12-06 00:45:36 +05:30
ubi lib: Add hexdump 2018-06-13 07:49:12 -04:00
ubispl SPDX: Convert all of our multiple license tags to Linux Kernel style 2018-05-07 10:24:31 -04:00
altera_qspi.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cfi_flash.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cfi_mtd.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
jedec_flash.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig mtd: Drop duplicate MTD_PARTITIONS Kconfig option 2018-11-13 18:53:10 +05:30
Makefile cmd: mtd: add 'mtd' command 2018-10-02 22:12:32 +05:30
mtd_uboot.c mtd: Don't stop MTD partition creation when it fails on one device 2018-12-06 00:45:36 +05:30
mtd-uclass.c mtd: uclass: add probe function 2018-10-02 22:12:31 +05:30
mtdconcat.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mtdcore.c mtd: Delete partitions attached to the device when a device is deleted 2018-12-06 00:45:36 +05:30
mtdcore.h mtd: move definitions to enlarge their range 2018-09-20 20:10:49 +05:30
mtdpart.c mtd: Don't stop MTD partition creation when it fails on one device 2018-12-06 00:45:36 +05:30
mw_eeprom.c Update i386 code (sc520_cdp) 2008-09-09 11:48:53 +02:00
pic32_flash.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
renesas_rpc_hf.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
st_smi.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
stm32_flash.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00