#
# PCMCIA bus subsystem configuration
#
# Right now the non-CardBus choices are not supported
# by the integrated kernel driver.
#

menu "PCCARD (PCMCIA/CardBus) support"

config PCCARD
	tristate "PCCard (PCMCIA/CardBus) support"
	select HOTPLUG
	---help---
	  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
	  computer.  These are credit-card size devices such as network cards,
	  modems or hard drives often used with laptops computers.  There are
	  actually two varieties of these cards: 16 bit PCMCIA and 32 bit
	  CardBus cards.

	  To compile this driver as modules, choose M here: the
	  module will be called pcmcia_core.

if PCCARD

config PCMCIA_DEBUG
	bool "Enable PCCARD debugging"
	help
	  Say Y here to enable PCMCIA subsystem debugging.  You
	  will need to choose the debugging level either via the
	  kernel command line, or module options depending whether
	  you build the PCMCIA as modules.

	  The kernel command line options are:
	    pcmcia_core.pc_debug=N
	    ds.pc_debug=N
	    sa11xx_core.pc_debug=N

	  The module option is called pc_debug=N

	  In all the above examples, N is the debugging verbosity
	  level.

config PCMCIA
	tristate "16-bit PCMCIA support"
	select CRC32
	default y
	---help---
	   This option enables support for 16-bit PCMCIA cards. Most older
	   PC-cards are such 16-bit PCMCIA cards, so unless you know you're
	   only using 32-bit CardBus cards, say Y or M here.

	   To use 16-bit PCMCIA cards, you will need supporting software in
	   most cases. (see the file <file:Documentation/Changes> for
	   location and details).

	   To compile this driver as modules, choose M here: the
	   module will be called pcmcia.

	   If unsure, say Y.

config PCMCIA_LOAD_CIS
	bool "Load CIS updates from userspace (EXPERIMENTAL)"
	depends on PCMCIA && EXPERIMENTAL
	select FW_LOADER
	default y
	help
	  Some PCMCIA cards require an updated Card Information Structure (CIS)
	  to be loaded from userspace to work correctly. If you say Y here,
	  and your userspace is arranged correctly, this will be loaded
	  automatically using the in-kernel firmware loader and the hotplug
	  subsystem, instead of relying on cardmgr from pcmcia-cs to do so.

	  If unsure, say Y.

config PCMCIA_IOCTL
	bool
	depends on PCMCIA
	default y
	help
	  If you say Y here, the deprecated ioctl interface to the PCMCIA
	  subsystem will be built. It is needed by cardmgr and cardctl
	  (pcmcia-cs) to function properly.

	  If you do not use the new pcmciautils package, and have a
	  yenta, Cirrus PD6729, i82092, i82365 or tcic compatible bridge,
	  you need to say Y here to be able to use 16-bit PCMCIA cards.

	  If unsure, say Y.

config CARDBUS
	bool "32-bit CardBus support"	
	depends on PCI
	default y
	---help---
	  CardBus is a bus mastering architecture for PC-cards, which allows
	  for 32 bit PC-cards (the original PCMCIA standard specifies only
	  a 16 bit wide bus). Many newer PC-cards are actually CardBus cards.

	  To use 32 bit PC-cards, you also need a CardBus compatible host
	  bridge. Virtually all modern PCMCIA bridges do this, and most of
	  them are "yenta-compatible", so say Y or M there, too.

	  If unsure, say Y.

comment "PC-card bridges"

config YENTA
	tristate "CardBus yenta-compatible bridge support"
	depends on CARDBUS
	select PCCARD_NONSTATIC
	---help---
	  This option enables support for CardBus host bridges.  Virtually
	  all modern PCMCIA bridges are CardBus compatible.  A "bridge" is 
	  the hardware inside your computer that PCMCIA cards are plugged 
	  into.

	  To compile this driver as modules, choose M here: the
	  module will be called yenta_socket.

	  If unsure, say Y.

config PD6729
	tristate "Cirrus PD6729 compatible bridge support"
	depends on PCMCIA && PCI
	select PCCARD_NONSTATIC
	help
	  This provides support for the Cirrus PD6729 PCI-to-PCMCIA bridge
	  device, found in some older laptops and PCMCIA card readers.

config I82092
	tristate "i82092 compatible bridge support"
	depends on PCMCIA && PCI
	select PCCARD_NONSTATIC
	help
	  This provides support for the Intel I82092AA PCI-to-PCMCIA bridge device,
	  found in some older laptops and more commonly in evaluation boards for the
	  chip.

config I82365
	tristate "i82365 compatible bridge support"
	depends on PCMCIA && ISA
	select PCCARD_NONSTATIC
	help
	  Say Y here to include support for ISA-bus PCMCIA host bridges that
	  are register compatible with the Intel i82365.  These are found on
	  older laptops and ISA-bus card readers for desktop systems.  A
	  "bridge" is the hardware inside your computer that PCMCIA cards are
	  plugged into. If unsure, say N.

config TCIC
	tristate "Databook TCIC host bridge support"
	depends on PCMCIA
	select PCCARD_NONSTATIC
	help
	  Say Y here to include support for the Databook TCIC family of PCMCIA
	  host bridges. These are only found on a handful of old systems.
	  "Bridge" is the name used for the hardware inside your computer that
	  PCMCIA cards are plugged into. If unsure, say N.

config HD64465_PCMCIA
	tristate "HD64465 host bridge support"
	depends on HD64465 && PCMCIA

config PCMCIA_AU1X00
	tristate "Au1x00 pcmcia support"
	depends on SOC_AU1X00 && PCMCIA

config PCMCIA_SA1100
	tristate "SA1100 support"
	depends on ARM && ARCH_SA1100 && PCMCIA
	help
	  Say Y here to include support for SA11x0-based PCMCIA or CF
	  sockets, found on HP iPAQs, Yopy, and other StrongARM(R)/
	  Xscale(R) embedded machines.

	  This driver is also available as a module called sa1100_cs.

config PCMCIA_SA1111
	tristate "SA1111 support"
	depends on ARM && ARCH_SA1100 && SA1111 && PCMCIA
	help
	  Say Y  here to include support for SA1111-based PCMCIA or CF
	  sockets, found on the Jornada 720, Graphicsmaster and other
	  StrongARM(R)/Xscale(R) embedded machines.

	  This driver is also available as a module called sa1111_cs.

config PCMCIA_PXA2XX
	tristate "PXA2xx support"
	depends on ARM && ARCH_PXA && PCMCIA
	help
	  Say Y here to include support for the PXA2xx PCMCIA controller

config PCMCIA_PROBE
	bool
	default y if ISA && !ARCH_SA1100 && !ARCH_CLPS711X

config M32R_PCC
	bool "M32R PCMCIA I/F"
	depends on M32R && CHIP_M32700 && PCMCIA
	select PCCARD_NONSTATIC
	help
	  Say Y here to use the M32R PCMCIA controller.

config M32R_CFC
	bool "M32R CF I/F Controller"
	depends on M32R && (PLAT_USRV || PLAT_M32700UT || PLAT_MAPPI2 || PLAT_MAPPI3 || PLAT_OPSPUT)
	select PCCARD_NONSTATIC
	help
	  Say Y here to use the M32R CompactFlash controller.

config M32R_CFC_NUM
	int "M32R CF I/F number"
	depends on M32R_CFC
	default "1" if PLAT_USRV || PLAT_M32700UT || PLAT_MAPPI2 || PLAT_MAPPI3 || PLAT_OPSPUT
	help
	  Set the number of M32R CF slots.

config PCMCIA_VRC4171
	tristate "NEC VRC4171 Card Controllers support"
	depends on VRC4171 && PCMCIA

config PCMCIA_VRC4173
	tristate "NEC VRC4173 CARDU support"
	depends on CPU_VR41XX && PCI && PCMCIA

config PCCARD_NONSTATIC
	tristate

endif	# PCCARD

endmenu
