Kconfig revision 923dd2a46349bb1bb94aa894b7ff61093618d68a
1if ETRAX_ARCH_V10
2
3config ETRAX_ETHERNET
4	bool "Ethernet support"
5	depends on ETRAX_ARCH_V10
6	select NET_ETHERNET
7	select MII
8	help
9	  This option enables the ETRAX 100LX built-in 10/100Mbit Ethernet
10	  controller.
11
12config ETRAX_SERIAL
13	bool "Serial-port support"
14	depends on ETRAX_ARCH_V10
15	help
16	  Enables the ETRAX 100 serial driver for ser0 (ttyS0)
17	  You probably want this enabled.
18
19config ETRAX_SERIAL_FAST_TIMER
20	bool "Use fast timers for serial DMA flush (experimental)"
21	depends on ETRAX_SERIAL
22	help
23	  Select this to have the serial DMAs flushed at a higher rate than
24	  normally, possible by using the fast timer API, the timeout is
25	  approx. 4 character times.
26	  If unsure, say N.
27
28config ETRAX_SERIAL_FLUSH_DMA_FAST
29	bool "Fast serial port DMA flush"
30	depends on ETRAX_SERIAL && !ETRAX_SERIAL_FAST_TIMER
31	help
32	  Select this to have the serial DMAs flushed at a higher rate than
33	  normally possible through a fast timer interrupt (currently at
34	  15360 Hz).
35	  If unsure, say N.
36
37config ETRAX_SERIAL_RX_TIMEOUT_TICKS
38	int "Receive flush timeout (ticks) "
39	depends on ETRAX_SERIAL && !ETRAX_SERIAL_FAST_TIMER && !ETRAX_SERIAL_FLUSH_DMA_FAST
40	default "5"
41	help
42	  Number of timer ticks between flush of receive fifo (1 tick = 10ms).
43	  Try 0-3 for low latency applications.  Approx 5 for high load
44	  applications (e.g. PPP).  Maybe this should be more adaptive some
45	  day...
46
47config ETRAX_SERIAL_PORT0
48	bool "Serial port 0 enabled"
49	depends on ETRAX_SERIAL
50	help
51	  Enables the ETRAX 100 serial driver for ser0 (ttyS0)
52	  Normally you want this on, unless you use external DMA 1 that uses
53	  the same DMA channels.
54
55choice
56	prompt "Ser0 DTR, RI, DSR and CD assignment"
57	depends on ETRAX_SERIAL_PORT0
58	default ETRAX_SER0_DTR_RI_DSR_CD_ON_NONE
59
60config ETRAX_SER0_DTR_RI_DSR_CD_ON_NONE
61	bool "No_DTR_RI_DSR_CD"
62
63config ETRAX_SER0_DTR_RI_DSR_CD_ON_PA
64	bool "DTR_RI_DSR_CD_on_PA"
65
66config ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
67	bool "DTR_RI_DSR_CD_on_PB"
68	help
69	  Enables the status and control signals DTR, RI, DSR and CD on PB for
70	  ser0.
71
72config ETRAX_SER0_DTR_RI_DSR_CD_MIXED
73	bool "DTR_RI_DSR_CD_mixed_on_PA_and_PB"
74
75endchoice
76
77config ETRAX_SER0_DTR_ON_PA_BIT
78	int "Ser0 DTR on PA bit (-1 = not used)" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PA || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
79	depends on ETRAX_SERIAL_PORT0
80	default "-1" if !ETRAX_SER0_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER0_DTR_RI_DSR_CD_MIXED
81	default "4" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PA || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
82
83config ETRAX_SER0_RI_ON_PA_BIT
84	int "Ser0 RI  on PA bit (-1 = not used)" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PA || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
85	depends on ETRAX_SERIAL_PORT0
86	default "-1" if !ETRAX_SER0_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER0_DTR_RI_DSR_CD_MIXED
87	default "5" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PA || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
88
89config ETRAX_SER0_DSR_ON_PA_BIT
90	int "Ser0 DSR on PA bit (-1 = not used)" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PA || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
91	depends on ETRAX_SERIAL_PORT0
92	default "-1" if !ETRAX_SER0_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER0_DTR_RI_DSR_CD_MIXED
93	default "6" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PA || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
94
95config ETRAX_SER0_CD_ON_PA_BIT
96	int "Ser0 CD  on PA bit (-1 = not used)" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PA || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
97	depends on ETRAX_SERIAL_PORT0
98	default "-1" if !ETRAX_SER0_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER0_DTR_RI_DSR_CD_MIXED
99	default "7" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PA || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
100
101config ETRAX_SER0_DTR_ON_PB_BIT
102	int "Ser0 DTR on PB bit (-1 = not used)" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PB || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
103	depends on ETRAX_SERIAL_PORT0
104	default "-1" if !ETRAX_SER0_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER0_DTR_RI_DSR_CD_MIXED
105	default "4" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PB || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
106	help
107	  Specify the pin of the PB port to carry the DTR signal for serial
108	  port 0.
109
110config ETRAX_SER0_RI_ON_PB_BIT
111	int "Ser0 RI  on PB bit (-1 = not used)" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PB || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
112	depends on ETRAX_SERIAL_PORT0
113	default "-1" if !ETRAX_SER0_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER0_DTR_RI_DSR_CD_MIXED
114	default "5" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PB || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
115	help
116	  Specify the pin of the PB port to carry the RI signal for serial
117	  port 0.
118
119config ETRAX_SER0_DSR_ON_PB_BIT
120	int "Ser0 DSR on PB bit (-1 = not used)" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PB || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
121	depends on ETRAX_SERIAL_PORT0
122	default "-1" if !ETRAX_SER0_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER0_DTR_RI_DSR_CD_MIXED
123	default "6" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PB || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
124	help
125	  Specify the pin of the PB port to carry the DSR signal for serial
126	  port 0.
127
128config ETRAX_SER0_CD_ON_PB_BIT
129	int "Ser0 CD  on PB bit (-1 = not used)" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PB || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
130	depends on ETRAX_SERIAL_PORT0
131	default "-1" if !ETRAX_SER0_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER0_DTR_RI_DSR_CD_MIXED
132	default "7" if ETRAX_SER0_DTR_RI_DSR_CD_ON_PB || ETRAX_SER0_DTR_RI_DSR_CD_MIXED
133	help
134	  Specify the pin of the PB port to carry the CD signal for serial
135	  port 0.
136
137config ETRAX_SERIAL_PORT1
138	bool "Serial port 1 enabled"
139	depends on ETRAX_SERIAL
140	help
141	  Enables the ETRAX 100 serial driver for ser1 (ttyS1).
142
143choice
144	prompt "Ser1 DTR, RI, DSR and CD assignment"
145	depends on ETRAX_SERIAL_PORT1
146	default ETRAX_SER1_DTR_RI_DSR_CD_ON_NONE
147
148config ETRAX_SER1_DTR_RI_DSR_CD_ON_NONE
149	bool "No_DTR_RI_DSR_CD"
150
151config ETRAX_SER1_DTR_RI_DSR_CD_ON_PA
152	bool "DTR_RI_DSR_CD_on_PA"
153
154config ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
155	bool "DTR_RI_DSR_CD_on_PB"
156	help
157	  Enables the status and control signals DTR, RI, DSR and CD on PB for
158	  ser1.
159
160config ETRAX_SER1_DTR_RI_DSR_CD_MIXED
161	bool "DTR_RI_DSR_CD_mixed_on_PA_and_PB"
162
163endchoice
164
165config ETRAX_SER1_DTR_ON_PA_BIT
166	int "Ser1 DTR on PA bit (-1 = not used)" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PA || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
167	depends on ETRAX_SERIAL_PORT1
168	default "-1" if !ETRAX_SER1_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER1_DTR_RI_DSR_CD_MIXED
169	default "4" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PA || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
170
171config ETRAX_SER1_RI_ON_PA_BIT
172	int "Ser1 RI  on PA bit (-1 = not used)" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PA || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
173	depends on ETRAX_SERIAL_PORT1
174	default "-1" if !ETRAX_SER1_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER1_DTR_RI_DSR_CD_MIXED
175	default "5" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PA || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
176
177config ETRAX_SER1_DSR_ON_PA_BIT
178	int "Ser1 DSR on PA bit (-1 = not used)" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PA || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
179	depends on ETRAX_SERIAL_PORT1
180	default "-1" if !ETRAX_SER1_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER1_DTR_RI_DSR_CD_MIXED
181	default "6" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PA || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
182
183config ETRAX_SER1_CD_ON_PA_BIT
184	int "Ser1 CD  on PA bit (-1 = not used)" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PA || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
185	depends on ETRAX_SERIAL_PORT1
186	default "-1" if !ETRAX_SER1_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER1_DTR_RI_DSR_CD_MIXED
187	default "7" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PA || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
188
189config ETRAX_SER1_DTR_ON_PB_BIT
190	int "Ser1 DTR on PB bit (-1 = not used)" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PB || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
191	depends on ETRAX_SERIAL_PORT1
192	default "-1" if !ETRAX_SER1_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER1_DTR_RI_DSR_CD_MIXED
193	default "4" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PB || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
194	help
195	  Specify the pin of the PB port to carry the DTR signal for serial
196	  port 1.
197
198config ETRAX_SER1_RI_ON_PB_BIT
199	int "Ser1 RI  on PB bit (-1 = not used)" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PB || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
200	depends on ETRAX_SERIAL_PORT1
201	default "-1" if !ETRAX_SER1_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER1_DTR_RI_DSR_CD_MIXED
202	default "5" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PB || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
203	help
204	  Specify the pin of the PB port to carry the RI signal for serial
205	  port 1.
206
207config ETRAX_SER1_DSR_ON_PB_BIT
208	int "Ser1 DSR on PB bit (-1 = not used)" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PB || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
209	depends on ETRAX_SERIAL_PORT1
210	default "-1" if !ETRAX_SER1_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER1_DTR_RI_DSR_CD_MIXED
211	default "6" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PB || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
212	help
213	  Specify the pin of the PB port to carry the DSR signal for serial
214	  port 1.
215
216config ETRAX_SER1_CD_ON_PB_BIT
217	int "Ser1 CD  on PB bit (-1 = not used)" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PB || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
218	depends on ETRAX_SERIAL_PORT1
219	default "-1" if !ETRAX_SER1_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER1_DTR_RI_DSR_CD_MIXED
220	default "7" if ETRAX_SER1_DTR_RI_DSR_CD_ON_PB || ETRAX_SER1_DTR_RI_DSR_CD_MIXED
221	help
222	  Specify the pin of the PB port to carry the CD signal for serial
223	  port 1.
224
225comment "Make sure you do not have the same PB bits more than once!"
226	depends on ETRAX_SERIAL && ETRAX_SER0_DTR_RI_DSR_CD_ON_PB && ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
227
228config ETRAX_SERIAL_PORT2
229	bool "Serial port 2 enabled"
230	depends on ETRAX_SERIAL
231	help
232	  Enables the ETRAX 100 serial driver for ser2 (ttyS2).
233
234choice
235	prompt "Ser2 DTR, RI, DSR and CD assignment"
236	depends on ETRAX_SERIAL_PORT2
237	default ETRAX_SER2_DTR_RI_DSR_CD_ON_NONE
238
239config ETRAX_SER2_DTR_RI_DSR_CD_ON_NONE
240	bool "No_DTR_RI_DSR_CD"
241
242config ETRAX_SER2_DTR_RI_DSR_CD_ON_PA
243	bool "DTR_RI_DSR_CD_on_PA"
244	help
245	  Enables the status and control signals DTR, RI, DSR and CD on PA for
246	  ser2.
247
248config ETRAX_SER2_DTR_RI_DSR_CD_ON_PB
249	bool "DTR_RI_DSR_CD_on_PB"
250
251config ETRAX_SER2_DTR_RI_DSR_CD_MIXED
252	bool "DTR_RI_DSR_CD_mixed_on_PA_and_PB"
253
254endchoice
255
256config ETRAX_SER2_DTR_ON_PA_BIT
257	int "Ser2 DTR on PA bit (-1 = not used)" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PA || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
258	depends on ETRAX_SERIAL_PORT2
259	default "-1" if !ETRAX_SER2_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER2_DTR_RI_DSR_CD_MIXED
260	default "4" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PA || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
261	help
262	  Specify the pin of the PA port to carry the DTR signal for serial
263	  port 2.
264
265config ETRAX_SER2_RI_ON_PA_BIT
266	int "Ser2 RI  on PA bit (-1 = not used)" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PA || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
267	depends on ETRAX_SERIAL_PORT2
268	default "-1" if !ETRAX_SER2_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER2_DTR_RI_DSR_CD_MIXED
269	default "5" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PA || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
270	help
271	  Specify the pin of the PA port to carry the RI signal for serial
272	  port 2.
273
274config ETRAX_SER2_DSR_ON_PA_BIT
275	int "Ser2 DSR on PA bit (-1 = not used)" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PA || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
276	depends on ETRAX_SERIAL_PORT2
277	default "-1" if !ETRAX_SER2_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER2_DTR_RI_DSR_CD_MIXED
278	default "6" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PA || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
279	help
280	  Specify the pin of the PA port to carry the DTR signal for serial
281	  port 2.
282
283config ETRAX_SER2_CD_ON_PA_BIT
284	int "Ser2 CD  on PA bit (-1 = not used)" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PA || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
285	depends on ETRAX_SERIAL_PORT2
286	default "-1" if !ETRAX_SER2_DTR_RI_DSR_CD_ON_PA && !ETRAX_SER2_DTR_RI_DSR_CD_MIXED
287	default "7" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PA || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
288	help
289	  Specify the pin of the PA port to carry the CD signal for serial
290	  port 2.
291
292config ETRAX_SER2_DTR_ON_PB_BIT
293	int "Ser2 DTR on PB bit (-1 = not used)" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PB || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
294	depends on ETRAX_SERIAL_PORT2
295	default "-1" if !ETRAX_SER2_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER2_DTR_RI_DSR_CD_MIXED
296	default "4" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PB || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
297
298config ETRAX_SER2_RI_ON_PB_BIT
299	int "Ser2 RI  on PB bit (-1 = not used)" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PB || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
300	depends on ETRAX_SERIAL_PORT2
301	default "-1" if !ETRAX_SER2_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER2_DTR_RI_DSR_CD_MIXED
302	default "5" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PB || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
303
304config ETRAX_SER2_DSR_ON_PB_BIT
305	int "Ser2 DSR on PB bit (-1 = not used)" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PB || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
306	depends on ETRAX_SERIAL_PORT2
307	default "-1" if !ETRAX_SER2_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER2_DTR_RI_DSR_CD_MIXED
308	default "6" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PB || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
309
310config ETRAX_SER2_CD_ON_PB_BIT
311	int "Ser2 CD  on PB bit (-1 = not used)" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PB || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
312	depends on ETRAX_SERIAL_PORT2
313	default "-1" if !ETRAX_SER2_DTR_RI_DSR_CD_ON_PB && !ETRAX_SER2_DTR_RI_DSR_CD_MIXED
314	default "7" if ETRAX_SER2_DTR_RI_DSR_CD_ON_PB || ETRAX_SER2_DTR_RI_DSR_CD_MIXED
315
316config ETRAX_SERIAL_PORT3
317	bool "Serial port 3 enabled"
318	depends on ETRAX_SERIAL
319	help
320	  Enables the ETRAX 100 serial driver for ser3 (ttyS3).
321
322choice
323	prompt "Ser3 DTR, RI, DSR and CD assignment"
324	depends on ETRAX_SERIAL_PORT3
325	default ETRAX_SER3_DTR_RI_DSR_CD_ON_NONE
326
327config ETRAX_SER3_DTR_RI_DSR_CD_ON_NONE
328	bool "No_DTR_RI_DSR_CD"
329
330config ETRAX_SER3_DTR_RI_DSR_CD_ON_PA
331	bool "DTR_RI_DSR_CD_on_PA"
332
333config ETRAX_SER3_DTR_RI_DSR_CD_ON_PB
334	bool "DTR_RI_DSR_CD_on_PB"
335
336config ETRAX_SER3_DTR_RI_DSR_CD_MIXED
337	bool "DTR_RI_DSR_CD_mixed_on_PA_and_PB"
338
339endchoice
340
341config ETRAX_SER3_DTR_ON_PA_BIT
342	int "Ser3 DTR on PA bit (-1 = not used)" if ETRAX_SER3_DTR_RI_DSR_CD_ON_PA || ETRAX_SER3_DTR_RI_DSR_CD_MIXED
343	depends on ETRAX_SERIAL_PORT3
344	default "-1"
345
346config ETRAX_SER3_RI_ON_PA_BIT
347	int "Ser3 RI  on PA bit (-1 = not used)" if ETRAX_SER3_DTR_RI_DSR_CD_ON_PA || ETRAX_SER3_DTR_RI_DSR_CD_MIXED
348	depends on ETRAX_SERIAL_PORT3
349	default "-1"
350
351config ETRAX_SER3_DSR_ON_PA_BIT
352	int "Ser3 DSR on PA bit (-1 = not used)" if ETRAX_SER3_DTR_RI_DSR_CD_ON_PA || ETRAX_SER3_DTR_RI_DSR_CD_MIXED
353	depends on ETRAX_SERIAL_PORT3
354	default "-1"
355
356config ETRAX_SER3_CD_ON_PA_BIT
357	int "Ser3 CD  on PA bit (-1 = not used)" if ETRAX_SER3_DTR_RI_DSR_CD_ON_PA || ETRAX_SER3_DTR_RI_DSR_CD_MIXED
358	depends on ETRAX_SERIAL_PORT3
359	default "-1"
360
361config ETRAX_SER3_DTR_ON_PB_BIT
362	int "Ser3 DTR on PB bit (-1 = not used)" if ETRAX_SER3_DTR_RI_DSR_CD_ON_PB || ETRAX_SER3_DTR_RI_DSR_CD_MIXED
363	depends on ETRAX_SERIAL_PORT3
364	default "-1"
365
366config ETRAX_SER3_RI_ON_PB_BIT
367	int "Ser3 RI  on PB bit (-1 = not used)" if ETRAX_SER3_DTR_RI_DSR_CD_ON_PB || ETRAX_SER3_DTR_RI_DSR_CD_MIXED
368	depends on ETRAX_SERIAL_PORT3
369	default "-1"
370
371config ETRAX_SER3_DSR_ON_PB_BIT
372	int "Ser3 DSR on PB bit (-1 = not used)" if ETRAX_SER3_DTR_RI_DSR_CD_ON_PB || ETRAX_SER3_DTR_RI_DSR_CD_MIXED
373	depends on ETRAX_SERIAL_PORT3
374	default "-1"
375
376config ETRAX_SER3_CD_ON_PB_BIT
377	int "Ser3 CD  on PB bit (-1 = not used)" if ETRAX_SER3_DTR_RI_DSR_CD_ON_PB || ETRAX_SER3_DTR_RI_DSR_CD_MIXED
378	depends on ETRAX_SERIAL_PORT3
379	default "-1"
380
381config ETRAX_RS485
382	bool "RS-485 support"
383	depends on ETRAX_SERIAL
384	help
385	  Enables support for RS-485 serial communication.  For a primer on
386	  RS-485, see <http://www.hw.cz/english/docs/rs485/rs485.html>.
387
388config ETRAX_RS485_ON_PA
389	bool "RS-485 mode on PA"
390	depends on ETRAX_RS485
391	help
392	  Control Driver Output Enable on RS485 transceiver using a pin on PA
393	  port:
394	  Axis 2400/2401 uses PA 3.
395
396config ETRAX_RS485_ON_PA_BIT
397	int "RS-485 mode on PA bit"
398	depends on ETRAX_RS485_ON_PA
399	default "3"
400	help
401	  Control Driver Output Enable on RS485 transceiver using a this bit
402	  on PA port.
403
404config ETRAX_RS485_DISABLE_RECEIVER
405	bool "Disable serial receiver"
406	depends on ETRAX_RS485
407	help
408	  It's necessary to disable the serial receiver to avoid serial
409	  loopback.  Not all products are able to do this in software only.
410	  Axis 2400/2401 must disable receiver.
411
412config ETRAX_USB_HOST
413	bool "USB host"
414	select USB
415	help
416	   This option enables the host functionality of the ETRAX 100LX
417	   built-in USB controller. In host mode the controller is designed
418	   for CTRL and BULK traffic only, INTR traffic may work as well
419	   however (depending on the requirements of timeliness).
420
421config ETRAX_USB_HOST_PORT1
422	bool "USB port 1 enabled"
423	depends on ETRAX_USB_HOST
424	default n
425
426config ETRAX_USB_HOST_PORT2
427	bool "USB port 2 enabled"
428	depends on ETRAX_USB_HOST
429	default n
430
431config ETRAX_AXISFLASHMAP
432	bool "Axis flash-map support"
433	depends on ETRAX_ARCH_V10
434	select MTD
435	select MTD_CFI
436	select MTD_CFI_AMDSTD
437	select MTD_CHAR
438	select MTD_BLOCK
439	select MTD_PARTITIONS
440	select MTD_CONCAT
441	select MTD_COMPLEX_MAPPINGS
442	help
443	  This option enables MTD mapping of flash devices.  Needed to use
444	  flash memories.  If unsure, say Y.
445
446config ETRAX_PTABLE_SECTOR
447	int "Byte-offset of partition table sector"
448	depends on ETRAX_AXISFLASHMAP
449	default "65536"
450	help
451	  Byte-offset of the partition table in the first flash chip.
452	  The default value is 64kB and should not be changed unless
453	  you know exactly what you are doing. The only valid reason
454	  for changing this is when the flash block size is bigger
455	  than 64kB (e.g. when using two parallel 16 bit flashes).
456
457config ETRAX_I2C
458	bool "I2C support"
459	depends on ETRAX_ARCH_V10
460	help
461	  Enables an I2C driver on ETRAX100.
462	  EXAMPLE usage:
463	  i2c_arg = I2C_WRITEARG(STA013_WRITE_ADDR, reg, val);
464	  ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_WRITEREG), i2c_arg);
465	  i2c_arg = I2C_READARG(STA013_READ_ADDR, reg);
466	  val = ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_READREG), i2c_arg);
467
468# this is true for most products since PB-I2C seems to be somewhat
469# flawed..
470config ETRAX_I2C_USES_PB_NOT_PB_I2C
471	bool "I2C uses PB not PB-I2C"
472	depends on ETRAX_I2C
473	help
474	  Select whether to use the special I2C mode in the PB I/O register or
475	  not.  This option needs to be selected in order to use some drivers
476	  that access the I2C I/O pins directly instead of going through the
477	  I2C driver, like the DS1302 realtime-clock driver.  If you are
478	  uncertain, choose Y here.
479
480config ETRAX_I2C_DATA_PORT
481	int "I2C SDA bit number"
482	depends on ETRAX_I2C_USES_PB_NOT_PB_I2C
483	default "0"
484	help
485	  Selects the pin on Port B where the data pin is connected
486
487config ETRAX_I2C_CLK_PORT
488	int "I2C SCL bit number"
489	depends on ETRAX_I2C_USES_PB_NOT_PB_I2C
490	default "1"
491	help
492	  Select the pin on Port B where the clock pin is connected
493
494config ETRAX_I2C_EEPROM
495	bool "I2C EEPROM (non-volatile RAM) support"
496	depends on ETRAX_I2C
497	help
498	  Enables I2C EEPROM (non-volatile RAM) on PB0 and PB1 using the I2C
499	  driver.  Select size option: Probed, 2k, 8k, 16k.
500	  (Probing works for 2k and 8k but not that well for 16k)
501
502choice
503	prompt "EEPROM size"
504	depends on ETRAX_I2C_EEPROM
505	default ETRAX_I2C_EEPROM_PROBE
506
507config ETRAX_I2C_EEPROM_PROBE
508	bool "Probed"
509	help
510	  Specifies size or auto probe of the EEPROM size.
511	  Options: Probed, 2k, 8k, 16k.
512	  (Probing works for 2k and 8k but not that well for 16k)
513
514config ETRAX_I2C_EEPROM_2KB
515	bool "2kB"
516	help
517	  Use a 2kB EEPROM.
518
519config ETRAX_I2C_EEPROM_8KB
520	bool "8kB"
521	help
522	  Use a 8kB EEPROM.
523
524config ETRAX_I2C_EEPROM_16KB
525	bool "16kB"
526	help
527	  Use a 16kB EEPROM.
528
529endchoice
530
531config ETRAX_GPIO
532	bool "GPIO support"
533	depends on ETRAX_ARCH_V10
534	---help---
535	  Enables the ETRAX general port device (major 120, minors 0 and 1).
536	  You can use this driver to access the general port bits. It supports
537	  these ioctl's:
538	  #include <linux/etraxgpio.h>
539	  fd = open("/dev/gpioa", O_RDWR); // or /dev/gpiob
540	  ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_SETBITS), bits_to_set);
541	  ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_CLRBITS), bits_to_clear);
542	  val = ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_READBITS), NULL);
543	  Remember that you need to setup the port directions appropriately in
544	  the General configuration.
545
546config ETRAX_PA_BUTTON_BITMASK
547	hex "PA-buttons bitmask"
548	depends on ETRAX_GPIO
549	default "02"
550	help
551	  This is a bitmask with information about what bits on PA that
552	  are used for buttons.
553	  Most products has a so called TEST button on PA1, if that's true
554	  use 02 here.
555	  Use 00 if there are no buttons on PA.
556	  If the bitmask is <> 00 a button driver will be included in the gpio
557	  driver. ETRAX general I/O support must be enabled.
558
559config ETRAX_PA_CHANGEABLE_DIR
560	hex "PA user changeable dir mask"
561	depends on ETRAX_GPIO
562	default "00"
563	help
564	  This is a bitmask with information of what bits in PA that a user
565	  can change direction on using ioctl's.
566	  Bit set = changeable.
567	  You probably want 00 here.
568
569config ETRAX_PA_CHANGEABLE_BITS
570	hex "PA user changeable bits mask"
571	depends on ETRAX_GPIO
572	default "FF"
573	help
574	  This is a bitmask with information of what bits in PA that a user
575	  can change the value on using ioctl's.
576	  Bit set = changeable.
577	  You probably want 00 here.
578
579config ETRAX_PB_CHANGEABLE_DIR
580	hex "PB user changeable dir mask"
581	depends on ETRAX_GPIO
582	default "00"
583	help
584	  This is a bitmask with information of what bits in PB that a user
585	  can change direction on using ioctl's.
586	  Bit set = changeable.
587	  You probably want 00 here.
588
589config ETRAX_PB_CHANGEABLE_BITS
590	hex "PB user changeable bits mask"
591	depends on ETRAX_GPIO
592	default "FF"
593	help
594	  This is a bitmask with information of what bits in PB that a user
595	  can change the value on using ioctl's.
596	  Bit set = changeable.
597	  You probably want 00 here.
598
599config ETRAX_RTC
600	bool "Real Time Clock support"
601	depends on ETRAX_ARCH_V10
602	help
603	  Enables drivers for the Real-Time Clock battery-backed chips on
604	  some products. The kernel reads the time when booting, and
605	  the date can be set using ioctl(fd, RTC_SET_TIME, &rt) with rt a
606	  rtc_time struct (see <file:include/asm-cris/rtc.h>) on the /dev/rtc
607	  device, major 121.  You can check the time with cat /proc/rtc, but
608	  normal time reading should be done using libc function time and
609	  friends.
610
611config ETRAX_DS1302_RST_ON_GENERIC_PORT
612	bool "DS1302 RST on Generic Port"
613	depends on ETRAX_DS1302
614	help
615	  If your product has the RST signal line for the DS1302 RTC on the
616	  Generic Port then say Y here, otherwise leave it as N in which
617	  case the RST signal line is assumed to be connected to Port PB
618	  (just like the SCL and SDA lines).
619
620config ETRAX_DS1302_RSTBIT
621	int "DS1302 RST bit number"
622	depends on ETRAX_DS1302
623	default "2"
624	help
625	  This is the bit number for the RST signal line of the DS1302 RTC on
626	  the selected port. If you have selected the generic port then it
627	  should be bit 27, otherwise your best bet is bit 5.
628
629config ETRAX_DS1302_SCLBIT
630	int "DS1302 SCL bit number"
631	depends on ETRAX_DS1302
632	default "1"
633	help
634	  This is the bit number for the SCL signal line of the DS1302 RTC on
635	  Port PB. This is probably best left at 3.
636
637config ETRAX_DS1302_SDABIT
638	int "DS1302 SDA bit number"
639	depends on ETRAX_DS1302
640	default "0"
641	help
642	  This is the bit number for the SDA signal line of the DS1302 RTC on
643	  Port PB. This is probably best left at 2.
644
645config ETRAX_DS1302_TRICKLE_CHARGE
646	int "DS1302 Trickle charger value"
647	depends on ETRAX_DS1302
648	default "0"
649	help
650	  This controls the initial value of the trickle charge register.
651	  0 = disabled (use this if you are unsure or have a non rechargeable battery)
652	  Otherwise the following values can be OR:ed together to control the
653	  charge current:
654	  1 = 2kohm, 2 = 4kohm, 3 = 4kohm
655	  4 = 1 diode, 8 = 2 diodes
656	  Allowed values are (increasing current): 0, 11, 10, 9, 7, 6, 5
657
658endif
659