#
# 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"
	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
