]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/cris/arch-v32/drivers/Kconfig
Finally eradicate CONFIG_HOTPLUG
[karo-tx-linux.git] / arch / cris / arch-v32 / drivers / Kconfig
1 if ETRAX_ARCH_V32
2
3 config ETRAX_ETHERNET
4         bool "Ethernet support"
5         depends on ETRAX_ARCH_V32
6         select ETHERNET
7         select NET_CORE
8         select MII
9         help
10           This option enables the ETRAX FS built-in 10/100Mbit Ethernet
11           controller.
12
13 config ETRAX_NO_PHY
14         bool "PHY not present"
15         depends on ETRAX_ETHERNET
16         default N
17         help
18           This option disables all MDIO communication with an ethernet
19           transceiver connected to the MII interface. This option shall
20           typically be enabled if the MII interface is connected to a
21           switch. This option should normally be disabled. If enabled,
22           speed and duplex will be locked to 100 Mbit and full duplex.
23
24 config ETRAX_ETHERNET_IFACE0
25         depends on ETRAX_ETHERNET
26         bool "Enable network interface 0"
27
28 config ETRAX_ETHERNET_IFACE1
29         depends on (ETRAX_ETHERNET && ETRAXFS)
30         bool "Enable network interface 1 (uses DMA6 and DMA7)"
31
32 config ETRAX_ETHERNET_GBIT
33         depends on (ETRAX_ETHERNET && CRIS_MACH_ARTPEC3)
34         bool "Enable gigabit Ethernet support"
35
36 choice
37         prompt "Eth0 led group"
38         depends on ETRAX_ETHERNET_IFACE0
39         default ETRAX_ETH0_USE_LEDGRP0
40
41 config ETRAX_ETH0_USE_LEDGRP0
42         bool "Use LED grp 0"
43         depends on ETRAX_NBR_LED_GRP_ONE || ETRAX_NBR_LED_GRP_TWO
44         help
45           Use LED grp 0 for eth0
46
47 config ETRAX_ETH0_USE_LEDGRP1
48         bool "Use LED grp 1"
49         depends on ETRAX_NBR_LED_GRP_TWO
50         help
51           Use LED grp 1 for eth0
52
53 config ETRAX_ETH0_USE_LEDGRPNULL
54         bool "Use no LEDs for eth0"
55         help
56           Use no LEDs for eth0
57 endchoice
58
59 choice
60         prompt "Eth1 led group"
61         depends on ETRAX_ETHERNET_IFACE1
62         default ETRAX_ETH1_USE_LEDGRP1
63
64 config ETRAX_ETH1_USE_LEDGRP0
65         bool "Use LED grp 0"
66         depends on ETRAX_NBR_LED_GRP_ONE || ETRAX_NBR_LED_GRP_TWO
67         help
68           Use LED grp 0 for eth1
69
70 config ETRAX_ETH1_USE_LEDGRP1
71         bool "Use LED grp 1"
72         depends on ETRAX_NBR_LED_GRP_TWO
73         help
74           Use LED grp 1 for eth1
75
76 config ETRAX_ETH1_USE_LEDGRPNULL
77         bool "Use no LEDs for eth1"
78         help
79           Use no LEDs for eth1
80 endchoice
81
82 config ETRAXFS_SERIAL
83         bool "Serial-port support"
84         depends on ETRAX_ARCH_V32
85         select SERIAL_CORE
86         select SERIAL_CORE_CONSOLE
87         help
88           Enables the ETRAX FS serial driver for ser0 (ttyS0)
89           You probably want this enabled.
90
91 config ETRAX_RS485
92         bool "RS-485 support"
93         depends on ETRAXFS_SERIAL
94         help
95           Enables support for RS-485 serial communication.
96
97 config ETRAX_RS485_DISABLE_RECEIVER
98         bool "Disable serial receiver"
99         depends on ETRAX_RS485
100         help
101           It is necessary to disable the serial receiver to avoid serial
102           loopback.  Not all products are able to do this in software only.
103
104 config ETRAX_SERIAL_PORT0
105         bool "Serial port 0 enabled"
106         depends on ETRAXFS_SERIAL
107         help
108           Enables the ETRAX FS serial driver for ser0 (ttyS0)
109           Normally you want this on. You can control what DMA channels to use
110           if you do not need DMA to something else.
111           ser0 can use dma4 or dma6 for output and dma5 or dma7 for input.
112
113 choice
114         prompt "Ser0 default port type "
115         depends on ETRAX_SERIAL_PORT0
116         default ETRAX_SERIAL_PORT0_TYPE_232
117         help
118           Type of serial port.
119
120 config ETRAX_SERIAL_PORT0_TYPE_232
121         bool "Ser0 is a RS-232 port"
122         help
123           Configure serial port 0 to be a RS-232 port.
124
125 config ETRAX_SERIAL_PORT0_TYPE_485HD
126         bool "Ser0 is a half duplex RS-485 port"
127         depends on ETRAX_RS485
128         help
129           Configure serial port 0 to be a half duplex (two wires) RS-485 port.
130
131 config ETRAX_SERIAL_PORT0_TYPE_485FD
132         bool "Ser0 is a full duplex RS-485 port"
133         depends on ETRAX_RS485
134         help
135           Configure serial port 0 to be a full duplex (four wires) RS-485 port.
136 endchoice
137
138 config ETRAX_SER0_DTR_BIT
139         string "Ser 0 DTR bit (empty = not used)"
140         depends on ETRAX_SERIAL_PORT0
141
142 config ETRAX_SER0_RI_BIT
143         string "Ser 0 RI bit (empty = not used)"
144         depends on ETRAX_SERIAL_PORT0
145
146 config ETRAX_SER0_DSR_BIT
147         string "Ser 0 DSR bit (empty = not used)"
148         depends on ETRAX_SERIAL_PORT0
149
150 config ETRAX_SER0_CD_BIT
151         string "Ser 0 CD bit (empty = not used)"
152         depends on ETRAX_SERIAL_PORT0
153
154 config ETRAX_SERIAL_PORT1
155         bool "Serial port 1 enabled"
156         depends on ETRAXFS_SERIAL
157         help
158           Enables the ETRAX FS serial driver for ser1 (ttyS1).
159
160 choice
161         prompt "Ser1 default port type"
162         depends on ETRAX_SERIAL_PORT1
163         default ETRAX_SERIAL_PORT1_TYPE_232
164         help
165           Type of serial port.
166
167 config ETRAX_SERIAL_PORT1_TYPE_232
168         bool "Ser1 is a RS-232 port"
169         help
170           Configure serial port 1 to be a RS-232 port.
171
172 config ETRAX_SERIAL_PORT1_TYPE_485HD
173         bool "Ser1 is a half duplex RS-485 port"
174         depends on ETRAX_RS485
175         help
176           Configure serial port 1 to be a half duplex (two wires) RS-485 port.
177
178 config ETRAX_SERIAL_PORT1_TYPE_485FD
179         bool "Ser1 is a full duplex RS-485 port"
180         depends on ETRAX_RS485
181         help
182           Configure serial port 1 to be a full duplex (four wires) RS-485 port.
183 endchoice
184
185 config ETRAX_SER1_DTR_BIT
186         string "Ser 1 DTR bit (empty = not used)"
187         depends on ETRAX_SERIAL_PORT1
188
189 config ETRAX_SER1_RI_BIT
190         string "Ser 1 RI bit (empty = not used)"
191         depends on ETRAX_SERIAL_PORT1
192
193 config ETRAX_SER1_DSR_BIT
194         string "Ser 1 DSR bit (empty = not used)"
195         depends on ETRAX_SERIAL_PORT1
196
197 config ETRAX_SER1_CD_BIT
198         string "Ser 1 CD bit (empty = not used)"
199         depends on ETRAX_SERIAL_PORT1
200
201 config ETRAX_SERIAL_PORT2
202         bool "Serial port 2 enabled"
203         depends on ETRAXFS_SERIAL
204         help
205           Enables the ETRAX FS serial driver for ser2 (ttyS2).
206
207 choice
208         prompt "Ser2 default port type"
209         depends on ETRAX_SERIAL_PORT2
210         default ETRAX_SERIAL_PORT2_TYPE_232
211         help
212           What DMA channel to use for ser2
213
214 config ETRAX_SERIAL_PORT2_TYPE_232
215         bool "Ser2 is a RS-232 port"
216         help
217           Configure serial port 2 to be a RS-232 port.
218
219 config ETRAX_SERIAL_PORT2_TYPE_485HD
220         bool "Ser2 is a half duplex RS-485 port"
221         depends on ETRAX_RS485
222         help
223           Configure serial port 2 to be a half duplex (two wires) RS-485 port.
224
225 config ETRAX_SERIAL_PORT2_TYPE_485FD
226         bool "Ser2 is a full duplex RS-485 port"
227         depends on ETRAX_RS485
228         help
229           Configure serial port 2 to be a full duplex (four wires) RS-485 port.
230 endchoice
231
232
233 config ETRAX_SER2_DTR_BIT
234         string "Ser 2 DTR bit (empty = not used)"
235         depends on ETRAX_SERIAL_PORT2
236
237 config ETRAX_SER2_RI_BIT
238         string "Ser 2 RI bit (empty = not used)"
239         depends on ETRAX_SERIAL_PORT2
240
241 config ETRAX_SER2_DSR_BIT
242         string "Ser 2 DSR bit (empty = not used)"
243         depends on ETRAX_SERIAL_PORT2
244
245 config ETRAX_SER2_CD_BIT
246         string "Ser 2 CD bit (empty = not used)"
247         depends on ETRAX_SERIAL_PORT2
248
249 config ETRAX_SERIAL_PORT3
250         bool "Serial port 3 enabled"
251         depends on ETRAXFS_SERIAL
252         help
253           Enables the ETRAX FS serial driver for ser3 (ttyS3).
254
255 choice
256         prompt "Ser3 default port type"
257         depends on ETRAX_SERIAL_PORT3
258         default ETRAX_SERIAL_PORT3_TYPE_232
259         help
260           What DMA channel to use for ser3.
261
262 config ETRAX_SERIAL_PORT3_TYPE_232
263         bool "Ser3 is a RS-232 port"
264         help
265           Configure serial port 3 to be a RS-232 port.
266
267 config ETRAX_SERIAL_PORT3_TYPE_485HD
268         bool "Ser3 is a half duplex RS-485 port"
269         depends on ETRAX_RS485
270         help
271           Configure serial port 3 to be a half duplex (two wires) RS-485 port.
272
273 config ETRAX_SERIAL_PORT3_TYPE_485FD
274         bool "Ser3 is a full duplex RS-485 port"
275         depends on ETRAX_RS485
276         help
277           Configure serial port 3 to be a full duplex (four wires) RS-485 port.
278 endchoice
279
280 config ETRAX_SER3_DTR_BIT
281         string "Ser 3 DTR bit (empty = not used)"
282         depends on ETRAX_SERIAL_PORT3
283
284 config ETRAX_SER3_RI_BIT
285         string "Ser 3 RI bit (empty = not used)"
286         depends on ETRAX_SERIAL_PORT3
287
288 config ETRAX_SER3_DSR_BIT
289         string "Ser 3 DSR bit (empty = not used)"
290         depends on ETRAX_SERIAL_PORT3
291
292 config ETRAX_SER3_CD_BIT
293         string "Ser 3 CD bit (empty = not used)"
294         depends on ETRAX_SERIAL_PORT3
295
296 config ETRAX_SERIAL_PORT4
297         bool "Serial port 4 enabled"
298         depends on ETRAXFS_SERIAL && CRIS_MACH_ARTPEC3
299         help
300           Enables the ETRAX FS serial driver for ser4 (ttyS4).
301
302 choice
303         prompt "Ser4 default port type"
304         depends on ETRAX_SERIAL_PORT4
305         default ETRAX_SERIAL_PORT4_TYPE_232
306         help
307           What DMA channel to use for ser4.
308
309 config ETRAX_SERIAL_PORT4_TYPE_232
310         bool "Ser4 is a RS-232 port"
311         help
312           Configure serial port 4 to be a RS-232 port.
313
314 config ETRAX_SERIAL_PORT4_TYPE_485HD
315         bool "Ser4 is a half duplex RS-485 port"
316         depends on ETRAX_RS485
317         help
318           Configure serial port 4 to be a half duplex (two wires) RS-485 port.
319
320 config ETRAX_SERIAL_PORT4_TYPE_485FD
321         bool "Ser4 is a full duplex RS-485 port"
322         depends on ETRAX_RS485
323         help
324           Configure serial port 4 to be a full duplex (four wires) RS-485 port.
325 endchoice
326
327 choice
328         prompt "Ser4 DMA in channel "
329         depends on ETRAX_SERIAL_PORT4
330         default ETRAX_SERIAL_PORT4_NO_DMA_IN
331         help
332           What DMA channel to use for ser4.
333
334
335 config ETRAX_SERIAL_PORT4_NO_DMA_IN
336         bool "Ser4 uses no DMA for input"
337         help
338           Do not use DMA for ser4 input.
339
340 config ETRAX_SERIAL_PORT4_DMA9_IN
341         bool "Ser4 uses DMA9 for input"
342         depends on ETRAX_SERIAL_PORT4
343         help
344           Enables the DMA9 input channel for ser4 (ttyS4).
345           If you do not enable DMA, an interrupt for each character will be
346           used when receiving data.
347           Normally you want to use DMA, unless you use the DMA channel for
348           something else.
349
350 endchoice
351
352 config ETRAX_SER4_DTR_BIT
353         string "Ser 4 DTR bit (empty = not used)"
354         depends on ETRAX_SERIAL_PORT4
355
356 config ETRAX_SER4_RI_BIT
357         string "Ser 4 RI bit (empty = not used)"
358         depends on ETRAX_SERIAL_PORT4
359
360 config ETRAX_SER4_DSR_BIT
361         string "Ser 4 DSR bit (empty = not used)"
362         depends on ETRAX_SERIAL_PORT4
363
364 config ETRAX_SER4_CD_BIT
365         string "Ser 4 CD bit (empty = not used)"
366         depends on ETRAX_SERIAL_PORT4
367
368 config ETRAX_SYNCHRONOUS_SERIAL
369         bool "Synchronous serial-port support"
370         depends on ETRAX_ARCH_V32
371         help
372           Enables the ETRAX FS synchronous serial driver.
373
374 config ETRAX_SYNCHRONOUS_SERIAL_PORT0
375          bool "Synchronous serial port 0 enabled"
376          depends on ETRAX_SYNCHRONOUS_SERIAL
377          help
378            Enabled synchronous serial port 0.
379
380 config ETRAX_SYNCHRONOUS_SERIAL0_DMA
381          bool "Enable DMA on synchronous serial port 0."
382          depends on ETRAX_SYNCHRONOUS_SERIAL_PORT0
383          help
384            A synchronous serial port can run in manual or DMA mode.
385            Selecting this option will make it run in DMA mode.
386
387 config ETRAX_SYNCHRONOUS_SERIAL_PORT1
388          bool "Synchronous serial port 1 enabled"
389          depends on ETRAX_SYNCHRONOUS_SERIAL && ETRAXFS
390          help
391            Enabled synchronous serial port 1.
392
393 config ETRAX_SYNCHRONOUS_SERIAL1_DMA
394          bool "Enable DMA on synchronous serial port 1."
395          depends on ETRAX_SYNCHRONOUS_SERIAL_PORT1
396          help
397            A synchronous serial port can run in manual or DMA mode.
398            Selecting this option will make it run in DMA mode.
399
400 config ETRAX_AXISFLASHMAP
401         bool "Axis flash-map support"
402         depends on ETRAX_ARCH_V32
403         select MTD
404         select MTD_CFI
405         select MTD_CFI_AMDSTD
406         select MTD_JEDECPROBE
407         select MTD_BLOCK
408         select MTD_COMPLEX_MAPPINGS
409         help
410           This option enables MTD mapping of flash devices.  Needed to use
411           flash memories.  If unsure, say Y.
412
413 config ETRAX_AXISFLASHMAP_MTD0WHOLE
414         bool "MTD0 is whole boot flash device"
415         depends on ETRAX_AXISFLASHMAP
416         default N
417         help
418           When this option is not set, mtd0 refers to the first partition
419           on the boot flash device. When set, mtd0 refers to the whole
420           device, with mtd1 referring to the first partition etc.
421
422 config ETRAX_PTABLE_SECTOR
423         int "Byte-offset of partition table sector"
424         depends on ETRAX_AXISFLASHMAP
425         default "65536"
426         help
427           Byte-offset of the partition table in the first flash chip.
428           The default value is 64kB and should not be changed unless
429           you know exactly what you are doing. The only valid reason
430           for changing this is when the flash block size is bigger
431           than 64kB (e.g. when using two parallel 16 bit flashes).
432
433 config ETRAX_NANDFLASH
434         bool "NAND flash support"
435         depends on ETRAX_ARCH_V32
436         select MTD_NAND
437         select MTD_NAND_IDS
438         help
439           This option enables MTD mapping of NAND flash devices.  Needed to use
440           NAND flash memories.  If unsure, say Y.
441
442 config ETRAX_NANDBOOT
443         bool "Boot from NAND flash"
444         depends on ETRAX_NANDFLASH
445         help
446           This options enables booting from NAND flash devices.
447           Say Y if your boot code, kernel and root file system is in
448           NAND flash. Say N if they are in NOR flash.
449
450 config ETRAX_I2C
451         bool "I2C driver"
452         depends on ETRAX_ARCH_V32
453         help
454           This option enables the I2C driver used by e.g. the RTC driver.
455
456 config ETRAX_V32_I2C_DATA_PORT
457         string "I2C data pin"
458         depends on ETRAX_I2C
459         help
460           The pin to use for I2C data.
461
462 config ETRAX_V32_I2C_CLK_PORT
463         string "I2C clock pin"
464         depends on ETRAX_I2C
465         help
466           The pin to use for I2C clock.
467
468 config ETRAX_GPIO
469         bool "GPIO support"
470         depends on ETRAX_ARCH_V32
471         ---help---
472           Enables the ETRAX general port device (major 120, minors 0-4).
473           You can use this driver to access the general port bits. It supports
474           these ioctl's:
475           #include <linux/etraxgpio.h>
476           fd = open("/dev/gpioa", O_RDWR); // or /dev/gpiob
477           ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_SETBITS), bits_to_set);
478           ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_CLRBITS), bits_to_clear);
479           err = ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_READ_INBITS), &val);
480           Remember that you need to setup the port directions appropriately in
481           the General configuration.
482
483 config ETRAX_VIRTUAL_GPIO
484         bool "Virtual GPIO support"
485         depends on ETRAX_GPIO
486         help
487           Enables the virtual Etrax general port device (major 120, minor 6).
488           It uses an I/O expander for the I2C-bus.
489
490 config ETRAX_VIRTUAL_GPIO_INTERRUPT_PA_PIN
491         int "Virtual GPIO interrupt pin on PA pin"
492         range 0 7
493         depends on ETRAX_VIRTUAL_GPIO
494         help
495           The pin to use on PA for virtual gpio interrupt.
496
497 config ETRAX_PA_CHANGEABLE_DIR
498         hex "PA user changeable dir mask"
499         depends on ETRAX_GPIO
500         default "0x00" if ETRAXFS
501         default "0x00000000" if !ETRAXFS
502         help
503           This is a bitmask (8 bits) with information of what bits in PA that a
504           user can change direction on using ioctl's.
505           Bit set = changeable.
506           You probably want 0 here, but it depends on your hardware.
507
508 config ETRAX_PA_CHANGEABLE_BITS
509         hex "PA user changeable bits mask"
510         depends on ETRAX_GPIO
511         default "0x00" if ETRAXFS
512         default "0x00000000" if !ETRAXFS
513         help
514           This is a bitmask (8 bits) with information of what bits in PA
515           that a user can change the value on using ioctl's.
516           Bit set = changeable.
517
518 config ETRAX_PB_CHANGEABLE_DIR
519         hex "PB user changeable dir mask"
520         depends on ETRAX_GPIO
521         default "0x00000" if ETRAXFS
522         default "0x00000000" if !ETRAXFS
523         help
524           This is a bitmask (18 bits) with information of what bits in PB
525           that a user can change direction on using ioctl's.
526           Bit set = changeable.
527           You probably want 0 here, but it depends on your hardware.
528
529 config ETRAX_PB_CHANGEABLE_BITS
530         hex "PB user changeable bits mask"
531         depends on ETRAX_GPIO
532         default "0x00000" if ETRAXFS
533         default "0x00000000" if !ETRAXFS
534         help
535           This is a bitmask (18 bits) with information of what bits in PB
536           that a user can change the value on using ioctl's.
537           Bit set = changeable.
538
539 config ETRAX_PC_CHANGEABLE_DIR
540         hex "PC user changeable dir mask"
541         depends on ETRAX_GPIO
542         default "0x00000" if ETRAXFS
543         default "0x00000000" if !ETRAXFS
544         help
545           This is a bitmask (18 bits) with information of what bits in PC
546           that a user can change direction on using ioctl's.
547           Bit set = changeable.
548           You probably want 0 here, but it depends on your hardware.
549
550 config ETRAX_PC_CHANGEABLE_BITS
551         hex "PC user changeable bits mask"
552         depends on ETRAX_GPIO
553         default "0x00000" if ETRAXFS
554         default "0x00000000" if ETRAXFS
555         help
556           This is a bitmask (18 bits) with information of what bits in PC
557           that a user can change the value on using ioctl's.
558           Bit set = changeable.
559
560 config ETRAX_PD_CHANGEABLE_DIR
561         hex "PD user changeable dir mask"
562         depends on ETRAX_GPIO && ETRAXFS
563         default "0x00000"
564         help
565           This is a bitmask (18 bits) with information of what bits in PD
566           that a user can change direction on using ioctl's.
567           Bit set = changeable.
568           You probably want 0x00000 here, but it depends on your hardware.
569
570 config ETRAX_PD_CHANGEABLE_BITS
571         hex "PD user changeable bits mask"
572         depends on ETRAX_GPIO && ETRAXFS
573         default "0x00000"
574         help
575           This is a bitmask (18 bits) with information of what bits in PD
576           that a user can change the value on using ioctl's.
577           Bit set = changeable.
578
579 config ETRAX_PE_CHANGEABLE_DIR
580         hex "PE user changeable dir mask"
581         depends on ETRAX_GPIO && ETRAXFS
582         default "0x00000"
583         help
584           This is a bitmask (18 bits) with information of what bits in PE
585           that a user can change direction on using ioctl's.
586           Bit set = changeable.
587           You probably want 0x00000 here, but it depends on your hardware.
588
589 config ETRAX_PE_CHANGEABLE_BITS
590         hex "PE user changeable bits mask"
591         depends on ETRAX_GPIO && ETRAXFS
592         default "0x00000"
593         help
594           This is a bitmask (18 bits) with information of what bits in PE
595           that a user can change the value on using ioctl's.
596           Bit set = changeable.
597
598 config ETRAX_PV_CHANGEABLE_DIR
599         hex "PV user changeable dir mask"
600         depends on ETRAX_VIRTUAL_GPIO
601         default "0x0000"
602         help
603           This is a bitmask (16 bits) with information of what bits in PV
604           that a user can change direction on using ioctl's.
605           Bit set = changeable.
606           You probably want 0x0000 here, but it depends on your hardware.
607
608 config ETRAX_PV_CHANGEABLE_BITS
609         hex "PV user changeable bits mask"
610         depends on ETRAX_VIRTUAL_GPIO
611         default "0x0000"
612         help
613           This is a bitmask (16 bits) with information of what bits in PV
614           that a user can change the value on using ioctl's.
615           Bit set = changeable.
616
617 config ETRAX_CARDBUS
618         bool "Cardbus support"
619         depends on ETRAX_ARCH_V32
620         help
621          Enabled the ETRAX Cardbus driver.
622
623 config PCI
624        bool
625        depends on ETRAX_CARDBUS
626        default y
627        select HAVE_GENERIC_DMA_COHERENT
628
629 config ETRAX_IOP_FW_LOAD
630         tristate "IO-processor hotplug firmware loading support"
631         depends on ETRAX_ARCH_V32
632         select FW_LOADER
633         help
634           Enables IO-processor hotplug firmware loading support.
635
636 config ETRAX_STREAMCOPROC
637         tristate "Stream co-processor driver enabled"
638         depends on ETRAX_ARCH_V32
639         help
640           This option enables a driver for the stream co-processor
641           for cryptographic operations.
642
643 source drivers/mmc/Kconfig
644
645 config ETRAX_MMC_IOP
646         tristate "MMC/SD host driver using IO-processor"
647         depends on ETRAX_ARCH_V32 && MMC
648         help
649           This option enables the SD/MMC host controller interface.
650           The host controller is implemented using the built in
651           IO-Processor. Only the SPU is used in this implementation.
652
653 config ETRAX_SPI_MMC
654 # Make this one of several "choices" (possible simultaneously but
655 # suggested uniquely) when an IOP driver emerges for "real" MMC/SD
656 # protocol support.
657         tristate
658         depends on !ETRAX_MMC_IOP
659         default MMC
660         select SPI
661         select MMC_SPI
662         select ETRAX_SPI_MMC_BOARD
663
664 # For the parts that can't be a module (due to restrictions in
665 # framework elsewhere).
666 config ETRAX_SPI_MMC_BOARD
667        boolean
668        default n
669
670 # While the board info is MMC_SPI only, the drivers are written to be
671 # independent of MMC_SPI, so we'll keep SPI non-dependent on the
672 # MMC_SPI config choices (well, except for a single depends-on-line
673 # for the board-info file until a separate non-MMC SPI board file
674 # emerges).
675 # FIXME: When that happens, we'll need to be able to ask for and
676 # configure non-MMC SPI ports together with MMC_SPI ports (if multiple
677 # SPI ports are enabled).
678
679 config SPI_ETRAX_SSER
680         tristate
681         depends on SPI_MASTER && ETRAX_ARCH_V32
682         select SPI_BITBANG
683         help
684           This enables using an synchronous serial (sser) port as a
685           SPI master controller on Axis ETRAX FS and later.  The
686           driver can be configured to use any sser port.
687
688 config SPI_ETRAX_GPIO
689         tristate
690         depends on SPI_MASTER && ETRAX_ARCH_V32
691         select SPI_BITBANG
692         help
693           This enables using GPIO pins port as a SPI master controller
694           on Axis ETRAX FS and later.  The driver can be configured to
695           use any GPIO pins.
696
697 config ETRAX_SPI_SSER0
698         tristate "SPI using synchronous serial port 0 (sser0)"
699         depends on ETRAX_SPI_MMC
700         default m if MMC_SPI=m
701         default y if MMC_SPI=y
702         default y if MMC_SPI=n
703         select SPI_ETRAX_SSER
704         help
705           Say Y for an MMC/SD socket connected to synchronous serial port 0,
706           or for devices using the SPI protocol on that port.  Say m if you
707           want to build it as a module, which will be named spi_crisv32_sser.
708           (You need to select MMC separately.)
709
710 config ETRAX_SPI_SSER0_DMA
711         bool "DMA for SPI on sser0 enabled"
712         depends on ETRAX_SPI_SSER0
713         depends on !ETRAX_SERIAL_PORT1_DMA4_OUT && !ETRAX_SERIAL_PORT1_DMA5_IN
714         default y
715         help
716           Say Y if using DMA (dma4/dma5) for SPI on synchronous serial port 0.
717
718 config ETRAX_SPI_MMC_CD_SSER0_PIN
719         string "MMC/SD card detect pin for SPI on sser0"
720         depends on ETRAX_SPI_SSER0 && MMC_SPI
721         default "pd11"
722         help
723           The pin to use for SD/MMC card detect.  This pin should be pulled up
724           and grounded when a card is present.  If defined as " " (space), no
725           pin is selected.  A card must then always be inserted for proper
726           action.
727
728 config ETRAX_SPI_MMC_WP_SSER0_PIN
729         string "MMC/SD card write-protect pin for SPI on sser0"
730         depends on ETRAX_SPI_SSER0 && MMC_SPI
731         default "pd10"
732         help
733           The pin to use for the SD/MMC write-protect signal for a memory
734           card.  If defined as " " (space), the card is considered writable.
735
736 config ETRAX_SPI_SSER1
737         tristate "SPI using synchronous serial port 1 (sser1)"
738         depends on ETRAX_SPI_MMC
739         default m if MMC_SPI=m && ETRAX_SPI_SSER0=n
740         default y if MMC_SPI=y && ETRAX_SPI_SSER0=n
741         default y if MMC_SPI=n && ETRAX_SPI_SSER0=n
742         select SPI_ETRAX_SSER
743         help
744           Say Y for an MMC/SD socket connected to synchronous serial port 1,
745           or for devices using the SPI protocol on that port.  Say m if you
746           want to build it as a module, which will be named spi_crisv32_sser.
747           (You need to select MMC separately.)
748
749 config ETRAX_SPI_SSER1_DMA
750         bool "DMA for SPI on sser1 enabled"
751         depends on ETRAX_SPI_SSER1 && !ETRAX_ETHERNET_IFACE1
752         depends on !ETRAX_SERIAL_PORT0_DMA6_OUT && !ETRAX_SERIAL_PORT0_DMA7_IN
753         default y
754         help
755           Say Y if using DMA (dma6/dma7) for SPI on synchronous serial port 1.
756
757 config ETRAX_SPI_MMC_CD_SSER1_PIN
758         string "MMC/SD card detect pin for SPI on sser1"
759         depends on ETRAX_SPI_SSER1 && MMC_SPI
760         default "pd12"
761         help
762           The pin to use for SD/MMC card detect.  This pin should be pulled up
763           and grounded when a card is present.  If defined as " " (space), no
764           pin is selected.  A card must then always be inserted for proper
765           action.
766
767 config ETRAX_SPI_MMC_WP_SSER1_PIN
768         string "MMC/SD card write-protect pin for SPI on sser1"
769         depends on ETRAX_SPI_SSER1 && MMC_SPI
770         default "pd9"
771         help
772           The pin to use for the SD/MMC write-protect signal for a memory
773           card.  If defined as " " (space), the card is considered writable.
774
775 config ETRAX_SPI_GPIO
776         tristate "Bitbanged SPI using gpio pins"
777         depends on ETRAX_SPI_MMC
778         select SPI_ETRAX_GPIO
779         default m if MMC_SPI=m && ETRAX_SPI_SSER0=n && ETRAX_SPI_SSER1=n
780         default y if MMC_SPI=y && ETRAX_SPI_SSER0=n && ETRAX_SPI_SSER1=n
781         default y if MMC_SPI=n && ETRAX_SPI_SSER0=n && ETRAX_SPI_SSER1=n
782         help
783           Say Y for an MMC/SD socket connected to general I/O pins (but not
784           a complete synchronous serial ports), or for devices using the SPI
785           protocol on general I/O pins.  Slow and slows down the system.
786           Say m to build it as a module, which will be called spi_crisv32_gpio.
787           (You need to select MMC separately.)
788
789 # The default match that of sser0, only because that's how it was tested.
790 config ETRAX_SPI_CS_PIN
791         string "SPI chip select pin"
792         depends on ETRAX_SPI_GPIO
793         default "pc3"
794         help
795           The pin to use for SPI chip select.
796
797 config ETRAX_SPI_CLK_PIN
798         string "SPI clock pin"
799         depends on ETRAX_SPI_GPIO
800         default "pc1"
801         help
802           The pin to use for the SPI clock.
803
804 config ETRAX_SPI_DATAIN_PIN
805         string "SPI MISO (data in) pin"
806         depends on ETRAX_SPI_GPIO
807         default "pc16"
808         help
809           The pin to use for SPI data in from the device.
810
811 config ETRAX_SPI_DATAOUT_PIN
812         string "SPI MOSI (data out) pin"
813         depends on ETRAX_SPI_GPIO
814         default "pc0"
815         help
816           The pin to use for SPI data out to the device.
817
818 config ETRAX_SPI_MMC_CD_GPIO_PIN
819         string "MMC/SD card detect pin for SPI using gpio (space for none)"
820         depends on ETRAX_SPI_GPIO && MMC_SPI
821         default "pd11"
822         help
823           The pin to use for SD/MMC card detect.  This pin should be pulled up
824           and grounded when a card is present.  If defined as " " (space), no
825           pin is selected.  A card must then always be inserted for proper
826           action.
827
828 config ETRAX_SPI_MMC_WP_GPIO_PIN
829         string "MMC/SD card write-protect pin for SPI using gpio (space for none)"
830         depends on ETRAX_SPI_GPIO && MMC_SPI
831         default "pd10"
832         help
833           The pin to use for the SD/MMC write-protect signal for a memory
834           card.  If defined as " " (space), the card is considered writable.
835
836 # Avoid choices causing non-working configs by conditionalizing the inclusion.
837 if ETRAX_SPI_MMC
838 source drivers/spi/Kconfig
839 endif
840
841 endif