wear_levelling: clean up Kconfig

This commit is contained in:
Ivan Grokhotkov 2017-08-08 03:20:02 +08:00
parent b260f6cb25
commit 097dced499

View file

@ -1,45 +1,57 @@
menu "FAT FS Wear Levelling Settings"
menu "Wear Levelling"
choice WL_SECTOR_SIZE
bool "FAT FS sector size"
default WL_SECTOR_SIZE_FAT
bool "Wear Levelling library sector size"
default WL_SECTOR_SIZE
help
Specify the FAT sector size.
Sector size used by wear levelling library.
You can set default sector size or size that will
fit to the flash device sector size.
config WL_SECTOR_SIZE_FAT
With sector size set to 4096 bytes, wear levelling library is more
efficient. However if FAT filesystem is used on top of wear levelling
library, it will need more temporary storage: 4096 bytes for each
mounted filesystem and 4096 bytes for each opened file.
With sector size set to 512 bytes, wear levelling library will perform
more operations with flash memory, but less RAM will be used by FAT
filesystem library (512 bytes for the filesystem and 512 bytes for each
file opened).
config WL_SECTOR_SIZE_512
bool "512"
config WL_SECTOR_SIZE_FLASH
config WL_SECTOR_SIZE_4096
bool "4096"
endchoice
config WL_SECTOR_SIZE
int
default 512 if WL_SECTOR_SIZE_FAT
default 4096 if WL_SECTOR_SIZE_FLASH
default 512 if WL_SECTOR_SIZE_512
default 4096 if WL_SECTOR_SIZE_4096
choice WL_SECTOR_MODE
bool "Sector store mode"
depends on WL_SECTOR_SIZE_512
default WL_SECTOR_MODE_PERF
help
Specify the mode to store data into the flash.
Specify the mode to store data into flash:
- In Performance mode a data will be stored to the RAM and then
stored back to the flash. Compared to the Safety mode, this operation is
faster, but if power will be lost when erase sector operation is in
progress, then the data from complete flash device sector will be lost.
- In Safety mode data from complete flash device sector will be read from
flash, modified, and then stored back to flash.
Compared to the Performance mode, this operation is slower, but if
power is lost during erase sector operation, then the data from full
flash device sector will not be lost.
config WL_SECTOR_MODE_PERF
bool "Perfomance"
help
In Performance mode a data will be stored to the RAM and then
stored back to the flash. Compare to the Safety mode, this operation
faster, but if by the erase sector operation power will be off, the
data from complete flash device sector will be lost.
config WL_SECTOR_MODE_SAFE
bool "Safety"
help
In Safety mode a data from complete flash device sector will be stored to the flash and then
stored back to the flash. Compare to the Performance mode, this operation
slower, but if by the erase sector operation power will be off, the
data of the full flash device sector will not be lost.
endchoice
config WL_SECTOR_MODE