aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/Kconfig
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-05-13 09:18:27 -0400
committerTom Rini <trini@konsulko.com>2022-06-06 12:09:00 -0400
commit2f57139c211d193debddd25f45c02b738cefd871 (patch)
treebbdf215e6fab764f7827c227d3090a43c3cae9cf /drivers/mtd/Kconfig
parentd498c670541a010899b25f9653713a804575606e (diff)
downloadu-boot-2f57139c211d193debddd25f45c02b738cefd871.zip
u-boot-2f57139c211d193debddd25f45c02b738cefd871.tar.gz
u-boot-2f57139c211d193debddd25f45c02b738cefd871.tar.bz2
Convert CONFIG_SYS_FLASH_CFI_WIDTH to Kconfig
This converts the following to Kconfig: CONFIG_SYS_FLASH_CFI_WIDTH Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/mtd/Kconfig')
-rw-r--r--drivers/mtd/Kconfig29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 4088267..c3f5455 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -48,6 +48,35 @@ config FLASH_CFI_DRIVER
option. Visit <http://www.amd.com/products/nvd/overview/cfi.html>
for more information on CFI.
+choice
+ prompt "Data-width of the flash device"
+ depends on FLASH_CFI_DRIVER
+ default SYS_FLASH_CFI_WIDTH_8BIT
+
+config SYS_FLASH_CFI_WIDTH_8BIT
+ bool "Data-width of the device is 8-bit"
+
+config SYS_FLASH_CFI_WIDTH_16BIT
+ bool "Data-width of the device is 16-bit"
+
+config SYS_FLASH_CFI_WIDTH_32BIT
+ bool "Data-width of the device is 32-bit"
+
+config SYS_FLASH_CFI_WIDTH_64BIT
+ bool "Data-width of the device is 64-bit"
+
+endchoice
+
+config SYS_FLASH_CFI_WIDTH
+ hex
+ depends on FLASH_CFI_DRIVER
+ default 0x1 if SYS_FLASH_CFI_WIDTH_8BIT
+ default 0x2 if SYS_FLASH_CFI_WIDTH_16BIT
+ default 0x4 if SYS_FLASH_CFI_WIDTH_32BIT
+ default 0x8 if SYS_FLASH_CFI_WIDTH_64BIT
+ help
+ This must be kept in sync with the table in include/flash.h
+
config CFI_FLASH
bool "Enable Driver Model for CFI Flash driver"
depends on DM_MTD