#
# Kernel configuration file for the UFS Host Controller
#
# This code is based on drivers/scsi/ufs/Kconfig
# Copyright (C) 2011-2013 Samsung India Software Operations
#
# Authors:
#	Santosh Yaraganavi <santosh.sy@samsung.com>
#	Vinayak Holikatti <h.vinayak@samsung.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# See the COPYING file in the top-level directory or visit
# <http://www.gnu.org/licenses/gpl-2.0.html>
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# This program is provided "AS IS" and "WITH ALL FAULTS" and
# without warranty of any kind. You are solely responsible for
# determining the appropriateness of using and distributing
# the program and assume all risks associated with your exercise
# of rights with respect to the program, including but not limited
# to infringement of third party rights, the risks and costs of
# program errors, damage to or loss of data, programs or equipment,
# and unavailability or interruption of operations. Under no
# circumstances will the contributor of this Program be liable for
# any damages of any kind arising from your use or distribution of
# this program.

config SCSI_UFSHCD
	tristate "Universal Flash Storage Controller Driver Core"
	depends on SCSI && SCSI_DMA
	select NLS
	---help---
	This selects the support for UFS devices in Linux, say Y and make
	  sure that you know the name of your UFS host adapter (the card
	  inside your computer that "speaks" the UFS protocol, also
	  called UFS Host Controller), because you will be asked for it.
	  The module will be called ufshcd.

	  To compile this driver as a module, choose M here and read
	  <file:Documentation/scsi/ufs.txt>.
	  However, do not compile this as a module if your root file system
	  (the one containing the directory /) is located on a UFS device.

config UFS_UN_18DIGITS
	bool "The digits of SEC unique number"
	depends on SCSI_UFSHCD

config SCSI_UFSHCD_PCI
	tristate "PCI bus based UFS Controller support"
	depends on SCSI_UFSHCD && PCI
	---help---
	This selects the PCI UFS Host Controller Interface. Select this if
	you have UFS Host Controller with PCI Interface.

	  If you have a controller with this interface, say Y or M here.

	  If unsure, say N.

config SCSI_UFS_DWC_TC_PCI
	tristate "DesignWare pci support using a G210 Test Chip"
	depends on SCSI_UFSHCD_PCI
	---help---
	  Synopsys Test Chip is a PHY for prototyping purposes.

	  If unsure, say N.

config SCSI_UFSHCD_PLATFORM
	tristate "Platform bus based UFS Controller support"
	depends on SCSI_UFSHCD
	---help---
	This selects the UFS host controller support. Select this if
	you have an UFS controller on Platform bus.

	If you have a controller with this interface, say Y or M here.

	  If unsure, say N.

config SCSI_UFS_DWC_TC_PLATFORM
	tristate "DesignWare platform support using a G210 Test Chip"
	depends on SCSI_UFSHCD_PLATFORM
	---help---
	  Synopsys Test Chip is a PHY for prototyping purposes.

	  If unsure, say N.

config SCSI_UFS_ASYNC_RELINK
	tristate "Asynchronous link establishment on UFS device resume"
	depends on SCSI_UFSHCD && SCSI_UFSHCD_PLATFORM
	---help---
	  This feature is to support concurrency of UFS resume and the others.
	  In UFS re-link, system wake-up may task a long time when UFS resume
	  time is increased for device latency or etc.

	  If you want to enable this feature, say Y or M here.

	  If unsure, say N.

config SCSI_UFS_CMD_LOGGING
	tristate "UFS cmd loggging support"
	depends on SCSI_UFSHCD && SCSI_UFSHCD_PLATFORM
	---help---
	  This feature is to support UFS cmd logging.
	  When UFS cmd transferred to UFS HCI
	  various data logs for debugging purpose.

	  If you want to enable this feature, say Y or M here.

	  If unsure, say N.

config SCSI_UFS_TEST_MODE
       bool "Samsung UFS TEST feature"
       depends on SCSI_UFSHCD && SCSI_UFSHCD_PLATFORM
       ---help---
         This selects support for test mode for debugging.
         Select this option if this feature is needed on working.

config UFS_DATA_LOG
	bool "Samsung UFS DATA logging"
	depends on SCSI_UFSHCD && SCSI_UFSHCD_PLATFORM
	---help---
	  This feature support for UFS Data logging.
	  Select this option if this feature is needed on working.

config UFS_DATA_LOG_MAGIC_CODE
	bool "Samsung UFS DATA logging"
	depends on SCSI_UFSHCD && SCSI_UFSHCD_PLATFORM && UFS_DATA_LOG
	---help---
	  This feature support for UFS Data logging include magic code.
	  Select this option if this feature is needed on working.

config SCSI_UFS_QCOM
	tristate "QCOM specific hooks to UFS controller platform driver"
	depends on SCSI_UFSHCD_PLATFORM && ARCH_QCOM
	select PHY_QCOM_UFS
	help
	  This selects the QCOM specific additions to UFSHCD platform driver.
	  UFS host on QCOM needs some vendor specific configuration before
	  accessing the hardware which includes PHY configuration and vendor
	  specific registers.

	  Select this if you have UFS controller on QCOM chipset.
	  If unsure, say N.

config SCSI_UFS_CRYPTO
	bool "UFS Crypto Engine Support"
	depends on SCSI_UFSHCD && BLK_INLINE_ENCRYPTION
	help
	  Enable Crypto Engine Support in UFS.
	  Enabling this makes it possible for the kernel to use the crypto
	  capabilities of the UFS device (if present) to perform crypto
	  operations on data being transferred to/from the device.

config SCSI_UFS_EXYNOS
	tristate "EXYNOS UFS Host Controller Driver"
	depends on SCSI_UFSHCD && SCSI_UFSHCD_PLATFORM
	---help---
	  This selects the EXYNOS UFS host controller driver.

	  If you have a controller with this interface, say Y or M here.

	  If unsure, say N.

config SCSI_UFS_EXYNOS_FMP
	bool "EXYNOS Flash Memory Protector for UFS Host"
	depends on SCSI_UFS_EXYNOS && EXYNOS_FMP && SCSI_UFS_CRYPTO
	default y
	---help---
	  This selects the EXYNOS UFS FMP Driver.

	  If you have a controller with this interface, say Y or M here.

	  If unsure, say N.
