#
# 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
	---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_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_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_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_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
	tristate "EXYNOS Flash Memory Protector for UFS Host"
	default y
	depends on SCSI_UFS_EXYNOS && EXYNOS_FMP
	---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.

config SCSI_UFS_EXYNOS_SMU
	tristate "EXYNOS Secure Management Unit for UFS Host"
	default y
	depends on SCSI_UFS_EXYNOS && EXYNOS_SMU
	---help---
	  This selects the EXYNOS UFS SMU Driver.

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

	  If unsure, say N.
