diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2010-08-19 20:28:50 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-10-19 10:19:55 -0400 |
commit | 1dd786328ff42b239a00fdbcdaed6fd9709042bf (patch) | |
tree | 2bdf0f5d47f47c87c9c976900ab9d47716b4bb66 /drivers/mtd | |
parent | cd07202cc8262e1669edff0d97715f3dd9260917 (diff) |
UBI: cleanup and simplify Kconfig
Cleanup the Kconfig for UBI by using menuconfig to enable/disable the entire
driver. Remove the dependency checks for MTD_UBI and MTD_UBI_DEBUG by
wrapping the options in if/endif blocks and remove any redundant checks.
Remove all default n since that is the Kconfig default. Change menu "Additional
UBI debugging messages" into a comment to remove one menu level.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/ubi/Kconfig | 17 | ||||
-rw-r--r-- | drivers/mtd/ubi/Kconfig.debug | 29 |
2 files changed, 10 insertions, 36 deletions
diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig index f702a163d8df..3cf193fb5e00 100644 --- a/drivers/mtd/ubi/Kconfig +++ b/drivers/mtd/ubi/Kconfig | |||
@@ -1,9 +1,5 @@ | |||
1 | menu "UBI - Unsorted block images" | 1 | menuconfig MTD_UBI |
2 | depends on MTD | 2 | tristate "Enable UBI - Unsorted block images" |
3 | |||
4 | config MTD_UBI | ||
5 | tristate "Enable UBI" | ||
6 | depends on MTD | ||
7 | select CRC32 | 3 | select CRC32 |
8 | help | 4 | help |
9 | UBI is a software layer above MTD layer which admits of LVM-like | 5 | UBI is a software layer above MTD layer which admits of LVM-like |
@@ -12,11 +8,12 @@ config MTD_UBI | |||
12 | capabilities. Please, consult the MTD web site for more details | 8 | capabilities. Please, consult the MTD web site for more details |
13 | (www.linux-mtd.infradead.org). | 9 | (www.linux-mtd.infradead.org). |
14 | 10 | ||
11 | if MTD_UBI | ||
12 | |||
15 | config MTD_UBI_WL_THRESHOLD | 13 | config MTD_UBI_WL_THRESHOLD |
16 | int "UBI wear-leveling threshold" | 14 | int "UBI wear-leveling threshold" |
17 | default 4096 | 15 | default 4096 |
18 | range 2 65536 | 16 | range 2 65536 |
19 | depends on MTD_UBI | ||
20 | help | 17 | help |
21 | This parameter defines the maximum difference between the highest | 18 | This parameter defines the maximum difference between the highest |
22 | erase counter value and the lowest erase counter value of eraseblocks | 19 | erase counter value and the lowest erase counter value of eraseblocks |
@@ -34,7 +31,6 @@ config MTD_UBI_BEB_RESERVE | |||
34 | int "Percentage of reserved eraseblocks for bad eraseblocks handling" | 31 | int "Percentage of reserved eraseblocks for bad eraseblocks handling" |
35 | default 1 | 32 | default 1 |
36 | range 0 25 | 33 | range 0 25 |
37 | depends on MTD_UBI | ||
38 | help | 34 | help |
39 | If the MTD device admits of bad eraseblocks (e.g. NAND flash), UBI | 35 | If the MTD device admits of bad eraseblocks (e.g. NAND flash), UBI |
40 | reserves some amount of physical eraseblocks to handle new bad | 36 | reserves some amount of physical eraseblocks to handle new bad |
@@ -48,8 +44,6 @@ config MTD_UBI_BEB_RESERVE | |||
48 | 44 | ||
49 | config MTD_UBI_GLUEBI | 45 | config MTD_UBI_GLUEBI |
50 | tristate "MTD devices emulation driver (gluebi)" | 46 | tristate "MTD devices emulation driver (gluebi)" |
51 | default n | ||
52 | depends on MTD_UBI | ||
53 | help | 47 | help |
54 | This option enables gluebi - an additional driver which emulates MTD | 48 | This option enables gluebi - an additional driver which emulates MTD |
55 | devices on top of UBI volumes: for each UBI volumes an MTD device is | 49 | devices on top of UBI volumes: for each UBI volumes an MTD device is |
@@ -59,4 +53,5 @@ config MTD_UBI_GLUEBI | |||
59 | software. | 53 | software. |
60 | 54 | ||
61 | source "drivers/mtd/ubi/Kconfig.debug" | 55 | source "drivers/mtd/ubi/Kconfig.debug" |
62 | endmenu | 56 | |
57 | endif # MTD_UBI | ||
diff --git a/drivers/mtd/ubi/Kconfig.debug b/drivers/mtd/ubi/Kconfig.debug index 61f6e5e40458..fad4adc0fe2c 100644 --- a/drivers/mtd/ubi/Kconfig.debug +++ b/drivers/mtd/ubi/Kconfig.debug | |||
@@ -1,94 +1,73 @@ | |||
1 | comment "UBI debugging options" | 1 | comment "UBI debugging options" |
2 | depends on MTD_UBI | ||
3 | 2 | ||
4 | config MTD_UBI_DEBUG | 3 | config MTD_UBI_DEBUG |
5 | bool "UBI debugging" | 4 | bool "UBI debugging" |
6 | depends on SYSFS | 5 | depends on SYSFS |
7 | depends on MTD_UBI | ||
8 | select DEBUG_FS | 6 | select DEBUG_FS |
9 | select KALLSYMS_ALL if KALLSYMS && DEBUG_KERNEL | 7 | select KALLSYMS_ALL if KALLSYMS && DEBUG_KERNEL |
10 | help | 8 | help |
11 | This option enables UBI debugging. | 9 | This option enables UBI debugging. |
12 | 10 | ||
11 | if MTD_UBI_DEBUG | ||
12 | |||
13 | config MTD_UBI_DEBUG_MSG | 13 | config MTD_UBI_DEBUG_MSG |
14 | bool "UBI debugging messages" | 14 | bool "UBI debugging messages" |
15 | depends on MTD_UBI_DEBUG | ||
16 | default n | ||
17 | help | 15 | help |
18 | This option enables UBI debugging messages. | 16 | This option enables UBI debugging messages. |
19 | 17 | ||
20 | config MTD_UBI_DEBUG_PARANOID | 18 | config MTD_UBI_DEBUG_PARANOID |
21 | bool "Extra self-checks" | 19 | bool "Extra self-checks" |
22 | default n | ||
23 | depends on MTD_UBI_DEBUG | ||
24 | help | 20 | help |
25 | This option enables extra checks in UBI code. Note this slows UBI down | 21 | This option enables extra checks in UBI code. Note this slows UBI down |
26 | significantly. | 22 | significantly. |
27 | 23 | ||
28 | config MTD_UBI_DEBUG_DISABLE_BGT | 24 | config MTD_UBI_DEBUG_DISABLE_BGT |
29 | bool "Do not enable the UBI background thread" | 25 | bool "Do not enable the UBI background thread" |
30 | depends on MTD_UBI_DEBUG | ||
31 | default n | ||
32 | help | 26 | help |
33 | This option switches the background thread off by default. The thread | 27 | This option switches the background thread off by default. The thread |
34 | may be also be enabled/disabled via UBI sysfs. | 28 | may be also be enabled/disabled via UBI sysfs. |
35 | 29 | ||
36 | config MTD_UBI_DEBUG_EMULATE_BITFLIPS | 30 | config MTD_UBI_DEBUG_EMULATE_BITFLIPS |
37 | bool "Emulate flash bit-flips" | 31 | bool "Emulate flash bit-flips" |
38 | depends on MTD_UBI_DEBUG | ||
39 | default n | ||
40 | help | 32 | help |
41 | This option emulates bit-flips with probability 1/50, which in turn | 33 | This option emulates bit-flips with probability 1/50, which in turn |
42 | causes scrubbing. Useful for debugging and stressing UBI. | 34 | causes scrubbing. Useful for debugging and stressing UBI. |
43 | 35 | ||
44 | config MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES | 36 | config MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES |
45 | bool "Emulate flash write failures" | 37 | bool "Emulate flash write failures" |
46 | depends on MTD_UBI_DEBUG | ||
47 | default n | ||
48 | help | 38 | help |
49 | This option emulates write failures with probability 1/100. Useful for | 39 | This option emulates write failures with probability 1/100. Useful for |
50 | debugging and testing how UBI handlines errors. | 40 | debugging and testing how UBI handlines errors. |
51 | 41 | ||
52 | config MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES | 42 | config MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES |
53 | bool "Emulate flash erase failures" | 43 | bool "Emulate flash erase failures" |
54 | depends on MTD_UBI_DEBUG | ||
55 | default n | ||
56 | help | 44 | help |
57 | This option emulates erase failures with probability 1/100. Useful for | 45 | This option emulates erase failures with probability 1/100. Useful for |
58 | debugging and testing how UBI handlines errors. | 46 | debugging and testing how UBI handlines errors. |
59 | 47 | ||
60 | menu "Additional UBI debugging messages" | 48 | comment "Additional UBI debugging messages" |
61 | depends on MTD_UBI_DEBUG | ||
62 | 49 | ||
63 | config MTD_UBI_DEBUG_MSG_BLD | 50 | config MTD_UBI_DEBUG_MSG_BLD |
64 | bool "Additional UBI initialization and build messages" | 51 | bool "Additional UBI initialization and build messages" |
65 | default n | ||
66 | depends on MTD_UBI_DEBUG | ||
67 | help | 52 | help |
68 | This option enables detailed UBI initialization and device build | 53 | This option enables detailed UBI initialization and device build |
69 | debugging messages. | 54 | debugging messages. |
70 | 55 | ||
71 | config MTD_UBI_DEBUG_MSG_EBA | 56 | config MTD_UBI_DEBUG_MSG_EBA |
72 | bool "Eraseblock association unit messages" | 57 | bool "Eraseblock association unit messages" |
73 | default n | ||
74 | depends on MTD_UBI_DEBUG | ||
75 | help | 58 | help |
76 | This option enables debugging messages from the UBI eraseblock | 59 | This option enables debugging messages from the UBI eraseblock |
77 | association unit. | 60 | association unit. |
78 | 61 | ||
79 | config MTD_UBI_DEBUG_MSG_WL | 62 | config MTD_UBI_DEBUG_MSG_WL |
80 | bool "Wear-leveling unit messages" | 63 | bool "Wear-leveling unit messages" |
81 | default n | ||
82 | depends on MTD_UBI_DEBUG | ||
83 | help | 64 | help |
84 | This option enables debugging messages from the UBI wear-leveling | 65 | This option enables debugging messages from the UBI wear-leveling |
85 | unit. | 66 | unit. |
86 | 67 | ||
87 | config MTD_UBI_DEBUG_MSG_IO | 68 | config MTD_UBI_DEBUG_MSG_IO |
88 | bool "Input/output unit messages" | 69 | bool "Input/output unit messages" |
89 | default n | ||
90 | depends on MTD_UBI_DEBUG | ||
91 | help | 70 | help |
92 | This option enables debugging messages from the UBI input/output unit. | 71 | This option enables debugging messages from the UBI input/output unit. |
93 | 72 | ||
94 | endmenu # UBI debugging messages | 73 | endif # MTD_UBI_DEBUG |