MLK-14667 ARM: imx v7 defconfig: disable CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
authorLeonard Crestez <leonard.crestez@nxp.com>
Tue, 27 Mar 2018 17:21:47 +0000 (20:21 +0300)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commitecb35458de88cdfe5ea303b1a7cc55f405fcc374
tree9acc0500071a75d48d04f6b696ae1ac2c473d19f
parent56767d2c310d021bc0235cf3117a8bfda76474ce
MLK-14667 ARM: imx v7 defconfig: disable CONFIG_MTD_SPI_NOR_USE_4K_SECTORS

Commit 556fa2d7d7e9 ("ENGR00318895-9: mtd: spi-nor: add more read
transfer flags for n25q256a") was incompletely cherry-picked, leaving
out the removal of the SECT_4K flag:

"From the datasheet, the chip support the 64K sector erase operation.
So remove the SECT_4K for the chip which makes the flash_erase
faster."

However, the above statement is not entirely correct. Using SECT_4K
can result in faster erase operations, if the block to erase is
smaller. The documentation in spi-nor.c also states:

"All newly added entries should describe *hardware* and should use
SECT_4K (or SECT_4K_PMC) if hardware supports erasing 4 KiB
sectors. For usage scenarios excluding small sectors there is config
option that can be disabled: CONFIG_MTD_SPI_NOR_USE_4K_SECTORS.  For
historical (and compatibility) reasons (before we got above config)
some old entries may be missing 4K flag."

Unfortunately, using SECT_4K means that ubifs will fail, because it
needs a minimum LBE of 15K.

Based on the above comments, it looks like the best way to handle the
ubifs issue is to disable CONFIG_MTD_SPI_NOR_USE_4K_SECTORS instead of
removing SECT_4K for the particular n25q256a chip. This approach also
has the advantage that will make ubifs work with any chip that has the
SECT_4K flag.

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
Reviewed-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
arch/arm/configs/imx_v7_defconfig