#
# 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 PM_DEVFREQ
	select DEVFREQ_GOV_SIMPLE_ONDEMAND
	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 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_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.
