Commit 5c6f8472 authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Nicolas Ferre

ARM: configs: at91: Remove MTD_BLOCK and use MTD_UBI_BLOCK for read only block FS

Using mtdblock on raw flashes is generally a bad idea as it lacks
wear-leveling, bad block handling or power-cut management.
What happens when you use mtdblock and you change any sector of your
mtdblockX device, is that it reads the whole corresponding eraseblock into
the memory, erases the eraseblock, changes the sector in RAM, and writes
the whole eraseblock back. If you have a power failure when the eraseblock
is being erased, you lose all the block device sectors in it. The flash
will likely decay soon because the eraseblocks will wear out.

Remove this archaic tool as its use case should rather be only for debug
purposes. This means that write-capable block file systems like ext2,
ext3, FAT, etc. will no longer be addressed with at91 defconfigs. For
read only block filesystems like SquashFS, use MTD_UBI_BLOCK instead and
benefit of UBI's bit-flip handling and wear-levelling.
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220420134740.193563-1-tudor.ambarus@microchip.com
parent 31231092
...@@ -50,13 +50,13 @@ CONFIG_DEVTMPFS_MOUNT=y ...@@ -50,13 +50,13 @@ CONFIG_DEVTMPFS_MOUNT=y
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_MTD_TESTS=m CONFIG_MTD_TESTS=m
CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_DATAFLASH=y CONFIG_MTD_DATAFLASH=y
CONFIG_MTD_RAW_NAND=y CONFIG_MTD_RAW_NAND=y
CONFIG_MTD_NAND_ATMEL=y CONFIG_MTD_NAND_ATMEL=y
CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_UBI=y CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_BLOCK=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=4 CONFIG_BLK_DEV_RAM_COUNT=4
......
...@@ -57,13 +57,13 @@ CONFIG_DEVTMPFS_MOUNT=y ...@@ -57,13 +57,13 @@ CONFIG_DEVTMPFS_MOUNT=y
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_MTD_TESTS=m CONFIG_MTD_TESTS=m
CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y CONFIG_MTD_CFI=y
CONFIG_MTD_RAW_NAND=y CONFIG_MTD_RAW_NAND=y
CONFIG_MTD_NAND_ATMEL=y CONFIG_MTD_NAND_ATMEL=y
CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_UBI=y CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_BLOCK=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=4 CONFIG_BLK_DEV_RAM_COUNT=4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment