#
# FIM devices configuration
#

menuconfig FIM_CORE
	bool "FIM drivers support"
	depends on PROCESSOR_NS921X
        select FW_LOADER
        select HOTPLUG 
	default n
	help
	  This option adds the support for the Flexible Interfaces Modules (FIM).
	  Currently only the NS921X processors are supporting the FIM-devices. 
          The number of available FIMs is two for NS9215 and one for NS9210.

	  For installing the specific FIM-firmware, the FIM core driver depends on
	  Hotplug and the firmware-subsystem too. 

##           If a FIM-driver is selected as loadable module, then is required
##           to have installed the user-space application 'mdev' (Busybox).


if FIM_CORE

config FIM_ONE
	bool "FIM 1"
	depends on PROCESSOR_NS9210 || PROCESSOR_NS9215
	help
	  Enables FIM 1

choice
	prompt "Choose FIM 1 driver"
	depends on FIM_ONE
	help
	  Only one of the following drivers can run in the FIM. Please pick one.

config FIM_ONE_SDIO
	bool "SDIO driver"
	depends on MMC && MMC_BLOCK && (!MACH_CME9210 && !MACH_CME9210JS)
	help
	  Enables the FIM-SDIO driver.
	  
          For testing the SDIO functionality is required to choose an additional 
          SDIO-driver (GPS/UART) from the MMC-core.

config FIM_ONE_SERIAL
	bool "Serial driver"
	depends on ((MACH_CC9P9215 || MACH_CC9P9215JS) || ((MACH_CME9210 || MACH_CME9210JS) && !CME9210JS_SERIAL_PORTA ))
	help
	  Enables the FIM-serial driver. 

config FIM_ONE_CAN
	bool "CAN-bus driver"
	depends on CAN && CAN_DEV && (!MACH_CME9210 && !MACH_CME9210JS)
	help
	  Enables the FIM-CAN bus driver.

endchoice # FIM_ONE

config FIM_TWO
	bool "FIM 2"
	depends on PROCESSOR_NS9210 || PROCESSOR_NS9215
	help
	  Enables FIM 2

choice
	prompt "Choose FIM 2 driver"
	depends on FIM_TWO
	help
	  Only one of the following drivers can run in the FIM. Please pick one.

config FIM_TWO_SDIO
	bool "SDIO driver"
	depends on MMC && MMC_BLOCK && (!MACH_CME9210 && !MACH_CME9210JS) && !FIM_ONE_SDIO
	help
	  Enables the FIM-SDIO serial driver. 
	  
          For testing the SDIO functionality is required to choose an additional 
          SDIO-driver (GPS/UART) from the MMC-core.

config FIM_TWO_SERIAL
	bool "Serial driver"
	depends on !MACH_CME9210 && !MACH_CME9210JS
	help
	  Enables the FIM-serial driver.

config FIM_TWO_CAN
	bool "CAN-bus driver"
	depends on CAN && CAN_DEV && ((MACH_CC9P9215 || MACH_CC9P9215JS) || ((MACH_CME9210 || MACH_CME9210JS) && (!CME9210JS_SERIAL_PORTA_FULL && !FIM_ONE_SERIAL)))
	help
	  Enables the FIM-CAN bus driver.

endchoice # FIM_TWO

endif # FIM_CORE

