aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2010-10-26 06:42:51 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-10-26 06:42:51 -0400
commit6411bf6cdfe9b444bc3aa0c23f8cf35460d69432 (patch)
tree0216003d2a1b3c67dd4352957e1cd5481d31bc02
parent08968041bef437ec363623cd3218c2b083537ada (diff)
Revert "mtd: cleanup Kconfig dependencies"
This reverts commit 432dc821c90114f9b0e00f6752a700e937516ade. The individual CFI geometry options were carefully set up to get sane default values if the CFI_ADV_OPTIONS wasn't set, and it wasn't appropriate to move them into an if/endif block. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/chips/Kconfig46
1 files changed, 24 insertions, 22 deletions
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
index baac35339172..35c6a23b183b 100644
--- a/drivers/mtd/chips/Kconfig
+++ b/drivers/mtd/chips/Kconfig
@@ -1,4 +1,5 @@
1menu "RAM/ROM/Flash chip drivers" 1menu "RAM/ROM/Flash chip drivers"
2 depends on MTD!=n
2 3
3config MTD_CFI 4config MTD_CFI
4 tristate "Detect flash chips by Common Flash Interface (CFI) probe" 5 tristate "Detect flash chips by Common Flash Interface (CFI) probe"
@@ -26,10 +27,9 @@ config MTD_JEDECPROBE
26config MTD_GEN_PROBE 27config MTD_GEN_PROBE
27 tristate 28 tristate
28 29
29if MTD_GEN_PROBE
30
31config MTD_CFI_ADV_OPTIONS 30config MTD_CFI_ADV_OPTIONS
32 bool "Flash chip driver advanced configuration options" 31 bool "Flash chip driver advanced configuration options"
32 depends on MTD_GEN_PROBE
33 help 33 help
34 If you need to specify a specific endianness for access to flash 34 If you need to specify a specific endianness for access to flash
35 chips, or if you wish to reduce the size of the kernel by including 35 chips, or if you wish to reduce the size of the kernel by including
@@ -39,10 +39,9 @@ config MTD_CFI_ADV_OPTIONS
39 39
40 If unsure, say 'N'. 40 If unsure, say 'N'.
41 41
42if MTD_CFI_ADV_OPTIONS
43
44choice 42choice
45 prompt "Flash cmd/query data swapping" 43 prompt "Flash cmd/query data swapping"
44 depends on MTD_CFI_ADV_OPTIONS
46 default MTD_CFI_NOSWAP 45 default MTD_CFI_NOSWAP
47 46
48config MTD_CFI_NOSWAP 47config MTD_CFI_NOSWAP
@@ -73,6 +72,7 @@ endchoice
73 72
74config MTD_CFI_GEOMETRY 73config MTD_CFI_GEOMETRY
75 bool "Specific CFI Flash geometry selection" 74 bool "Specific CFI Flash geometry selection"
75 depends on MTD_CFI_ADV_OPTIONS
76 help 76 help
77 This option does not affect the code directly, but will enable 77 This option does not affect the code directly, but will enable
78 some other configuration options which would allow you to reduce 78 some other configuration options which would allow you to reduce
@@ -80,78 +80,81 @@ config MTD_CFI_GEOMETRY
80 arrangements of CFI chips. If unsure, say 'N' and all options 80 arrangements of CFI chips. If unsure, say 'N' and all options
81 which are supported by the current code will be enabled. 81 which are supported by the current code will be enabled.
82 82
83if MTD_CFI_GEOMETRY
84
85config MTD_MAP_BANK_WIDTH_1 83config MTD_MAP_BANK_WIDTH_1
86 bool "Support 8-bit buswidth" 84 bool "Support 8-bit buswidth" if MTD_CFI_GEOMETRY
87 default y 85 default y
88 help 86 help
89 If you wish to support CFI devices on a physical bus which is 87 If you wish to support CFI devices on a physical bus which is
90 8 bits wide, say 'Y'. 88 8 bits wide, say 'Y'.
91 89
92config MTD_MAP_BANK_WIDTH_2 90config MTD_MAP_BANK_WIDTH_2
93 bool "Support 16-bit buswidth" 91 bool "Support 16-bit buswidth" if MTD_CFI_GEOMETRY
94 default y 92 default y
95 help 93 help
96 If you wish to support CFI devices on a physical bus which is 94 If you wish to support CFI devices on a physical bus which is
97 16 bits wide, say 'Y'. 95 16 bits wide, say 'Y'.
98 96
99config MTD_MAP_BANK_WIDTH_4 97config MTD_MAP_BANK_WIDTH_4
100 bool "Support 32-bit buswidth" 98 bool "Support 32-bit buswidth" if MTD_CFI_GEOMETRY
101 default y 99 default y
102 help 100 help
103 If you wish to support CFI devices on a physical bus which is 101 If you wish to support CFI devices on a physical bus which is
104 32 bits wide, say 'Y'. 102 32 bits wide, say 'Y'.
105 103
106config MTD_MAP_BANK_WIDTH_8 104config MTD_MAP_BANK_WIDTH_8
107 bool "Support 64-bit buswidth" 105 bool "Support 64-bit buswidth" if MTD_CFI_GEOMETRY
106 default n
108 help 107 help
109 If you wish to support CFI devices on a physical bus which is 108 If you wish to support CFI devices on a physical bus which is
110 64 bits wide, say 'Y'. 109 64 bits wide, say 'Y'.
111 110
112config MTD_MAP_BANK_WIDTH_16 111config MTD_MAP_BANK_WIDTH_16
113 bool "Support 128-bit buswidth" 112 bool "Support 128-bit buswidth" if MTD_CFI_GEOMETRY
113 default n
114 help 114 help
115 If you wish to support CFI devices on a physical bus which is 115 If you wish to support CFI devices on a physical bus which is
116 128 bits wide, say 'Y'. 116 128 bits wide, say 'Y'.
117 117
118config MTD_MAP_BANK_WIDTH_32 118config MTD_MAP_BANK_WIDTH_32
119 bool "Support 256-bit buswidth" 119 bool "Support 256-bit buswidth" if MTD_CFI_GEOMETRY
120 default n
120 help 121 help
121 If you wish to support CFI devices on a physical bus which is 122 If you wish to support CFI devices on a physical bus which is
122 256 bits wide, say 'Y'. 123 256 bits wide, say 'Y'.
123 124
124config MTD_CFI_I1 125config MTD_CFI_I1
125 bool "Support 1-chip flash interleave" 126 bool "Support 1-chip flash interleave" if MTD_CFI_GEOMETRY
126 default y 127 default y
127 help 128 help
128 If your flash chips are not interleaved - i.e. you only have one 129 If your flash chips are not interleaved - i.e. you only have one
129 flash chip addressed by each bus cycle, then say 'Y'. 130 flash chip addressed by each bus cycle, then say 'Y'.
130 131
131config MTD_CFI_I2 132config MTD_CFI_I2
132 bool "Support 2-chip flash interleave" 133 bool "Support 2-chip flash interleave" if MTD_CFI_GEOMETRY
133 default y 134 default y
134 help 135 help
135 If your flash chips are interleaved in pairs - i.e. you have two 136 If your flash chips are interleaved in pairs - i.e. you have two
136 flash chips addressed by each bus cycle, then say 'Y'. 137 flash chips addressed by each bus cycle, then say 'Y'.
137 138
138config MTD_CFI_I4 139config MTD_CFI_I4
139 bool "Support 4-chip flash interleave" 140 bool "Support 4-chip flash interleave" if MTD_CFI_GEOMETRY
141 default n
140 help 142 help
141 If your flash chips are interleaved in fours - i.e. you have four 143 If your flash chips are interleaved in fours - i.e. you have four
142 flash chips addressed by each bus cycle, then say 'Y'. 144 flash chips addressed by each bus cycle, then say 'Y'.
143 145
144config MTD_CFI_I8 146config MTD_CFI_I8
145 bool "Support 8-chip flash interleave" 147 bool "Support 8-chip flash interleave" if MTD_CFI_GEOMETRY
148 default n
146 help 149 help
147 If your flash chips are interleaved in eights - i.e. you have eight 150 If your flash chips are interleaved in eights - i.e. you have eight
148 flash chips addressed by each bus cycle, then say 'Y'. 151 flash chips addressed by each bus cycle, then say 'Y'.
149 152
150endif # MTD_CFI_GEOMETRY
151
152config MTD_OTP 153config MTD_OTP
153 bool "Protection Registers aka one-time programmable (OTP) bits" 154 bool "Protection Registers aka one-time programmable (OTP) bits"
155 depends on MTD_CFI_ADV_OPTIONS
154 select HAVE_MTD_OTP 156 select HAVE_MTD_OTP
157 default n
155 help 158 help
156 This enables support for reading, writing and locking so called 159 This enables support for reading, writing and locking so called
157 "Protection Registers" present on some flash chips. 160 "Protection Registers" present on some flash chips.
@@ -173,10 +176,9 @@ config MTD_OTP
173 This feature should therefore be used with extreme care. Any mistake 176 This feature should therefore be used with extreme care. Any mistake
174 in the programming of OTP bits will waste them. 177 in the programming of OTP bits will waste them.
175 178
176endif # MTD_CFI_ADV_OPTIONS
177
178config MTD_CFI_INTELEXT 179config MTD_CFI_INTELEXT
179 tristate "Support for Intel/Sharp flash chips" 180 tristate "Support for Intel/Sharp flash chips"
181 depends on MTD_GEN_PROBE
180 select MTD_CFI_UTIL 182 select MTD_CFI_UTIL
181 help 183 help
182 The Common Flash Interface defines a number of different command 184 The Common Flash Interface defines a number of different command
@@ -186,6 +188,7 @@ config MTD_CFI_INTELEXT
186 188
187config MTD_CFI_AMDSTD 189config MTD_CFI_AMDSTD
188 tristate "Support for AMD/Fujitsu/Spansion flash chips" 190 tristate "Support for AMD/Fujitsu/Spansion flash chips"
191 depends on MTD_GEN_PROBE
189 select MTD_CFI_UTIL 192 select MTD_CFI_UTIL
190 help 193 help
191 The Common Flash Interface defines a number of different command 194 The Common Flash Interface defines a number of different command
@@ -195,14 +198,13 @@ config MTD_CFI_AMDSTD
195 198
196config MTD_CFI_STAA 199config MTD_CFI_STAA
197 tristate "Support for ST (Advanced Architecture) flash chips" 200 tristate "Support for ST (Advanced Architecture) flash chips"
201 depends on MTD_GEN_PROBE
198 select MTD_CFI_UTIL 202 select MTD_CFI_UTIL
199 help 203 help
200 The Common Flash Interface defines a number of different command 204 The Common Flash Interface defines a number of different command
201 sets which a CFI-compliant chip may claim to implement. This code 205 sets which a CFI-compliant chip may claim to implement. This code
202 provides support for one of those command sets. 206 provides support for one of those command sets.
203 207
204endif # MTD_GEN_PROBE
205
206config MTD_CFI_UTIL 208config MTD_CFI_UTIL
207 tristate 209 tristate
208 210