fs: Kconfig: Clean up representation of mutually exclusive options
The flash and RAM disk options are mutually exclusive (evident e.g. in both defining FS_VOLUME_SIZE and FS_BLOCK_SIZE variables), so they should really be inside a choice-endchoice block. The duplicated options can also taken care of with a single definition using conditional default values. Change-Id: I87733f0c342166a9e03aa0e1f34390d91107b137 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
7f62a95f93
commit
51390c39a2
1 changed files with 13 additions and 24 deletions
|
@ -22,44 +22,46 @@ config FILE_SYSTEM
|
||||||
help
|
help
|
||||||
Enables support for file system.
|
Enables support for file system.
|
||||||
|
|
||||||
|
if FILE_SYSTEM
|
||||||
|
|
||||||
config FILE_SYSTEM_FAT
|
config FILE_SYSTEM_FAT
|
||||||
bool "FAT file system support"
|
bool "FAT file system support"
|
||||||
default y
|
default y
|
||||||
depends on FILE_SYSTEM
|
|
||||||
help
|
help
|
||||||
Enables FAT file system support.
|
Enables FAT file system support.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Storage backend selection"
|
||||||
|
|
||||||
config FS_FAT_RAM_DISK
|
config FS_FAT_RAM_DISK
|
||||||
bool
|
bool "RAM Disk"
|
||||||
prompt "RAM Disk"
|
|
||||||
help
|
help
|
||||||
RAM buffer used to emulate storage disk.
|
RAM buffer used to emulate storage disk.
|
||||||
This option can used to test the file
|
This option can used to test the file
|
||||||
system.
|
system.
|
||||||
|
|
||||||
config FS_FAT_FLASH_DISK
|
config FS_FAT_FLASH_DISK
|
||||||
bool
|
bool "Flash"
|
||||||
prompt "Flash"
|
|
||||||
help
|
help
|
||||||
Flash device is used for the file system.
|
Flash device is used for the file system.
|
||||||
|
|
||||||
if FS_FAT_RAM_DISK
|
endchoice
|
||||||
|
|
||||||
config FS_VOLUME_SIZE
|
config FS_VOLUME_SIZE
|
||||||
hex
|
hex
|
||||||
default 0x18000
|
default 0x18000 if FS_FAT_RAM_DISK
|
||||||
|
default 0x200000 if FS_FAT_FLASH_DISK_W25QXXDV
|
||||||
help
|
help
|
||||||
This is the file system volume size in bytes.
|
This is the file system volume size in bytes.
|
||||||
|
|
||||||
config FS_BLOCK_SIZE
|
config FS_BLOCK_SIZE
|
||||||
hex
|
hex
|
||||||
default 0x1000
|
default 0x1000 if FS_FAT_RAM_DISK
|
||||||
|
default 0x1000 if FS_FAT_FLASH_DISK_W25QXXDV
|
||||||
help
|
help
|
||||||
This is typically the minimum block size that
|
This is typically the minimum block size that
|
||||||
is erased at one time in flash storage.
|
is erased at one time in flash storage.
|
||||||
|
|
||||||
endif # FS_RAM_DISK
|
|
||||||
|
|
||||||
if FS_FAT_FLASH_DISK
|
if FS_FAT_FLASH_DISK
|
||||||
|
|
||||||
config FS_FAT_FLASH_DISK_W25QXXDV
|
config FS_FAT_FLASH_DISK_W25QXXDV
|
||||||
|
@ -71,19 +73,6 @@ config FS_FAT_FLASH_DISK_W25QXXDV
|
||||||
|
|
||||||
if FS_FAT_FLASH_DISK_W25QXXDV
|
if FS_FAT_FLASH_DISK_W25QXXDV
|
||||||
|
|
||||||
config FS_VOLUME_SIZE
|
|
||||||
hex
|
|
||||||
default 0x200000
|
|
||||||
help
|
|
||||||
This is the file system volume size in bytes.
|
|
||||||
|
|
||||||
config FS_BLOCK_SIZE
|
|
||||||
hex
|
|
||||||
default 0x1000
|
|
||||||
help
|
|
||||||
This is typically the minimum flash erase size
|
|
||||||
that the flash component supports.
|
|
||||||
|
|
||||||
config FS_FLASH_DEV_NAME
|
config FS_FLASH_DEV_NAME
|
||||||
string
|
string
|
||||||
prompt "File system flash storage device name"
|
prompt "File system flash storage device name"
|
||||||
|
@ -113,7 +102,7 @@ config FS_FLASH_ERASE_ALIGNMENT
|
||||||
the flash component.
|
the flash component.
|
||||||
|
|
||||||
endif # FS_FAT_FLASH_DISK_W25QXXDV
|
endif # FS_FAT_FLASH_DISK_W25QXXDV
|
||||||
|
|
||||||
endif # FS_FAT_FLASH_DISK
|
endif # FS_FAT_FLASH_DISK
|
||||||
|
endif # FILE_SYSTEM
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue