# SPDX-License-Identifier: GPL-2.0
#
# SATA/PATA driver configuration
#

config HAVE_PATA_PLATFORM
	bool
	help
	  This is an internal configuration node for any machine that
	  uses pata-platform driver to enable the relevant driver in the
	  configuration structure without having to submit endless patches
	  to update the PATA_PLATFORM entry.

menuconfig ATA
	tristate "Serial ATA and Parallel ATA drivers (libata)"
	depends on HAS_IOMEM
	depends on BLOCK
	select SCSI
	select GLOB
	---help---
	  If you want to use an ATA hard disk, ATA tape drive, ATA CD-ROM or
	  any other ATA device under Linux, say Y and make sure that you know
	  the name of your ATA host adapter (the card inside your computer
	  that "speaks" the ATA protocol, also called ATA controller),
	  because you will be asked for it.

	  NOTE: ATA enables basic SCSI support; *however*,
	  'SCSI disk support', 'SCSI tape support', or
	  'SCSI CDROM support' may also be needed,
	  depending on your hardware configuration.

if ATA

config ATA_NONSTANDARD
       bool

config ATA_VERBOSE_ERROR
	bool "Verbose ATA error reporting"
	default y
	help
	  This option adds parsing of ATA command descriptions and error bits
	  in libata kernel output, making it easier to interpret.
	  This option will enlarge the kernel by approx. 6KB. Disable it only
	  if kernel size is more important than ease of debugging.

	  If unsure, say Y.

config ATA_ACPI
	bool "ATA ACPI Support"
	depends on ACPI
	default y
	help
	  This option adds support for ATA-related ACPI objects.
	  These ACPI objects add the ability to retrieve taskfiles
	  from the ACPI BIOS and write them to the disk controller.
	  These objects may be related to performance, security,
	  power management, or other areas.
	  You can disable this at kernel boot time by using the
	  option libata.noacpi=1

config SATA_ZPODD
	bool "SATA Zero Power Optical Disc Drive (ZPODD) support"
	depends on ATA_ACPI && PM
	help
	  This option adds support for SATA Zero Power Optical Disc
	  Drive (ZPODD). It requires both the ODD and the platform
	  support, and if enabled, will automatically power on/off the
	  ODD when certain condition is satisfied. This does not impact
	  end user's experience of the ODD, only power is saved when
	  the ODD is not in use (i.e. no disc inside).

	  If unsure, say N.

config SATA_PMP
	bool "SATA Port Multiplier support"
	default y
	help
	  This option adds support for SATA Port Multipliers
	  (the SATA version of an ethernet hub, or SAS expander).

if HAS_DMA

comment "Controllers with non-SFF native interface"

config SATA_AHCI
	tristate "AHCI SATA support"
	depends on PCI
	help
	  This option enables support for AHCI Serial ATA.

	  If unsure, say N.

config SATA_MOBILE_LPM_POLICY
	int "Default SATA Link Power Management policy for mobile chipsets"
	range 0 4
	default 0
	depends on SATA_AHCI
	help
	  Select the Default SATA Link Power Management (LPM) policy to use
	  for mobile / laptop variants of chipsets / "South Bridges".

	  The value set has the following meanings:
		0 => Keep firmware settings
		1 => Maximum performance
		2 => Medium power
		3 => Medium power with Device Initiated PM enabled
		4 => Minimum power

	  Note "Minimum power" is known to cause issues, including disk
	  corruption, with some disks and should not be used.

config SATA_AHCI_PLATFORM
	tristate "Platform AHCI SATA support"
	help
	  This option enables support for Platform AHCI Serial ATA
	  controllers.

	  If unsure, say N.

config AHCI_BRCM
	tristate "Broadcom AHCI SATA support"
	depends on ARCH_BRCMSTB || BMIPS_GENERIC || ARCH_BCM_NSP || \
		   ARCH_BCM_63XX
	help
	  This option enables support for the AHCI SATA3 controller found on
	  Broadcom SoC's.

	  If unsure, say N.

config AHCI_DA850
	tristate "DaVinci DA850 AHCI SATA support"
	depends on ARCH_DAVINCI_DA850
	help
	  This option enables support for the DaVinci DA850 SoC's
	  onboard AHCI SATA.

	  If unsure, say N.

config AHCI_DM816
	tristate "DaVinci DM816 AHCI SATA support"
	depends on ARCH_OMAP2PLUS
	help
	  This option enables support for the DaVinci DM816 SoC's
	  onboard AHCI SATA controller.

	  If unsure, say N.

config AHCI_ST
	tristate "ST AHCI SATA support"
	depends on ARCH_STI
	help
	  This option enables support for ST AHCI SATA controller.

	  If unsure, say N.

config AHCI_IMX
	tristate "Freescale i.MX AHCI SATA support"
	depends on MFD_SYSCON && (ARCH_MXC || COMPILE_TEST)
	depends on (HWMON && (THERMAL || !THERMAL_OF)) || !HWMON
	help
	  This option enables support for the Freescale i.MX SoC's
	  onboard AHCI SATA.

	  If unsure, say N.

config AHCI_CEVA
	tristate "CEVA AHCI SATA support"
	depends on OF
	help
	  This option enables support for the CEVA AHCI SATA.
	  It can be found on the Xilinx Zynq UltraScale+ MPSoC.

	  If unsure, say N.

config AHCI_MTK
	tristate "MediaTek AHCI SATA support"
	depends on ARCH_MEDIATEK
	select MFD_SYSCON
	help
	  This option enables support for the MediaTek SoC's
	  onboard AHCI SATA controller.

	  If unsure, say N.

config AHCI_MVEBU
	tristate "Marvell EBU AHCI SATA support"
	depends on ARCH_MVEBU
	help
	  This option enables support for the Marvebu EBU SoC's
	  onboard AHCI SATA.

	  If unsure, say N.

config AHCI_OCTEON
	tristate "Cavium Octeon Soc Serial ATA"
	depends on SATA_AHCI_PLATFORM && CAVIUM_OCTEON_SOC
	default y
	help
	  This option enables support for Cavium Octeon SoC Serial ATA.

	  If unsure, say N.

config AHCI_SUNXI
	tristate "Allwinner sunxi AHCI SATA support"
	depends on ARCH_SUNXI
	help
	  This option enables support for the Allwinner sunxi SoC's
	  onboard AHCI SATA.

	  If unsure, say N.

config AHCI_TEGRA
	tristate "NVIDIA Tegra AHCI SATA support"
	depends on ARCH_TEGRA
	help
	  This option enables support for the NVIDIA Tegra SoC's
	  onboard AHCI SATA.

	  If unsure, say N.

config AHCI_XGENE
	tristate "APM X-Gene 6.0Gbps AHCI SATA host controller support"
	depends on PHY_XGENE
	help
	 This option enables support for APM X-Gene SoC SATA host controller.

config AHCI_QORIQ
	tristate "Freescale QorIQ AHCI SATA support"
	depends on OF
	help
	  This option enables support for the Freescale QorIQ AHCI SoC's
	  onboard AHCI SATA.

	  If unsure, say N.

config SATA_FSL
	tristate "Freescale 3.0Gbps SATA support"
	depends on FSL_SOC
	help
	  This option enables support for Freescale 3.0Gbps SATA controller.
	  It can be found on MPC837x and MPC8315.

	  If unsure, say N.

config SATA_GEMINI
	tristate "Gemini SATA bridge support"
	depends on ARCH_GEMINI || COMPILE_TEST
	default ARCH_GEMINI
	help
	  This enabled support for the FTIDE010 to SATA bridge
	  found in Cortina Systems Gemini platform.

	  If unsure, say N.

config SATA_AHCI_SEATTLE
	tristate "AMD Seattle 6.0Gbps AHCI SATA host controller support"
	depends on ARCH_SEATTLE
	help
	 This option enables support for AMD Seattle SATA host controller.

	 If unsure, say N

config SATA_INIC162X
	tristate "Initio 162x SATA support (Very Experimental)"
	depends on PCI
	help
	  This option enables support for Initio 162x Serial ATA.

config SATA_ACARD_AHCI
	tristate "ACard AHCI variant (ATP 8620)"
	depends on PCI
	help
	  This option enables support for Acard.

	  If unsure, say N.

config SATA_SIL24
	tristate "Silicon Image 3124/3132 SATA support"
	depends on PCI
	help
	  This option enables support for Silicon Image 3124/3132 Serial ATA.

	  If unsure, say N.

endif # HAS_DMA

config ATA_SFF
	bool "ATA SFF support (for legacy IDE and PATA)"
	default y
	help
	  This option adds support for ATA controllers with SFF
	  compliant or similar programming interface.

	  SFF is the legacy IDE interface that has been around since
	  the dawn of time.  Almost all PATA controllers have an
	  SFF interface.  Many SATA controllers have an SFF interface
	  when configured into a legacy compatibility mode.

	  For users with exclusively modern controllers like AHCI,
	  Silicon Image 3124, or Marvell 6440, you may choose to
	  disable this unneeded SFF support.

	  If unsure, say Y.

if ATA_SFF

comment "SFF controllers with custom DMA interface"

config PDC_ADMA
	tristate "Pacific Digital ADMA support"
	depends on PCI
	help
	  This option enables support for Pacific Digital ADMA controllers

	  If unsure, say N.

config PATA_OCTEON_CF
	tristate "OCTEON Boot Bus Compact Flash support"
	depends on CAVIUM_OCTEON_SOC
	help
	  This option enables a polled compact flash driver for use with
	  compact flash cards attached to the OCTEON boot bus.

	  If unsure, say N.

config SATA_QSTOR
	tristate "Pacific Digital SATA QStor support"
	depends on PCI
	help
	  This option enables support for Pacific Digital Serial ATA QStor.

	  If unsure, say N.

config SATA_SX4
	tristate "Promise SATA SX4 support (Experimental)"
	depends on PCI
	help
	  This option enables support for Promise Serial ATA SX4.

	  If unsure, say N.

config ATA_BMDMA
	bool "ATA BMDMA support"
	depends on HAS_DMA
	default y
	help
	  This option adds support for SFF ATA controllers with BMDMA
	  capability.  BMDMA stands for bus-master DMA and is the
	  de facto DMA interface for SFF controllers.

	  If unsure, say Y.

if ATA_BMDMA

comment "SATA SFF controllers with BMDMA"

config ATA_PIIX
	tristate "Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support"
	depends on PCI
	help
	  This option enables support for ICH5/6/7/8 Serial ATA
	  and support for PATA on the Intel ESB/ICH/PIIX3/PIIX4 series
	  host controllers.

	  If unsure, say N.

config SATA_DWC
	tristate "DesignWare Cores SATA support"
	depends on DMADEVICES
	select GENERIC_PHY
	help
	  This option enables support for the on-chip SATA controller of the
	  AppliedMicro processor 460EX.

	  If unsure, say N.

config SATA_DWC_OLD_DMA
	bool "Support old device trees"
	depends on SATA_DWC
	select DW_DMAC_CORE
	default y if 460EX
	help
	  This option enables support for old device trees without the
	  "dmas" property.

config SATA_DWC_DEBUG
	bool "Debugging driver version"
	depends on SATA_DWC
	help
	  This option enables debugging output in the driver.

config SATA_DWC_VDEBUG
	bool "Verbose debug output"
	depends on SATA_DWC_DEBUG
	help
	  This option enables the taskfile dumping and NCQ debugging.

config SATA_HIGHBANK
	tristate "Calxeda Highbank SATA support"
	depends on ARCH_HIGHBANK || COMPILE_TEST
	help
	  This option enables support for the Calxeda Highbank SoC's
	  onboard SATA.

	  If unsure, say N.

config SATA_MV
	tristate "Marvell SATA support"
	depends on PCI || ARCH_DOVE || ARCH_MV78XX0 || \
		   ARCH_MVEBU || ARCH_ORION5X || COMPILE_TEST
	select GENERIC_PHY
	help
	  This option enables support for the Marvell Serial ATA family.
	  Currently supports 88SX[56]0[48][01] PCI(-X) chips,
	  as well as the newer [67]042 PCI-X/PCIe and SOC devices.

	  If unsure, say N.

config SATA_NV
	tristate "NVIDIA SATA support"
	depends on PCI
	help
	  This option enables support for NVIDIA Serial ATA.

	  If unsure, say N.

config SATA_PROMISE
	tristate "Promise SATA TX2/TX4 support"
	depends on PCI
	help
	  This option enables support for Promise Serial ATA TX2/TX4.

	  If unsure, say N.

config SATA_RCAR
	tristate "Renesas R-Car SATA support"
	depends on ARCH_RENESAS || COMPILE_TEST
	help
	  This option enables support for Renesas R-Car Serial ATA.

	  If unsure, say N.

config SATA_SIL
	tristate "Silicon Image SATA support"
	depends on PCI
	help
	  This option enables support for Silicon Image Serial ATA.

	  If unsure, say N.

config SATA_SIS
	tristate "SiS 964/965/966/180 SATA support"
	depends on PCI
	select PATA_SIS
	help
	  This option enables support for SiS Serial ATA on
	  SiS 964/965/966/180 and Parallel ATA on SiS 180.
	  The PATA support for SiS 180 requires additionally to
	  enable the PATA_SIS driver in the config.
	  If unsure, say N.

config SATA_SVW
	tristate "ServerWorks Frodo / Apple K2 SATA support"
	depends on PCI
	help
	  This option enables support for Broadcom/Serverworks/Apple K2
	  SATA support.

	  If unsure, say N.

config SATA_ULI
	tristate "ULi Electronics SATA support"
	depends on PCI
	help
	  This option enables support for ULi Electronics SATA.

	  If unsure, say N.

config SATA_VIA
	tristate "VIA SATA support"
	depends on PCI
	help
	  This option enables support for VIA Serial ATA.

	  If unsure, say N.

config SATA_VITESSE
	tristate "VITESSE VSC-7174 / INTEL 31244 SATA support"
	depends on PCI
	help
	  This option enables support for Vitesse VSC7174 and Intel 31244 Serial ATA.

	  If unsure, say N.

comment "PATA SFF controllers with BMDMA"

config PATA_ALI
	tristate "ALi PATA support"
	depends on PCI
	help
	  This option enables support for the ALi ATA interfaces
	  found on the many ALi chipsets.

	  If unsure, say N.

config PATA_AMD
	tristate "AMD/NVidia PATA support"
	depends on PCI
	help
	  This option enables support for the AMD and NVidia PATA
	  interfaces found on the chipsets for Athlon/Athlon64.

	  If unsure, say N.

config PATA_ARASAN_CF
	tristate "ARASAN CompactFlash PATA Controller Support"
	depends on ARCH_SPEAR13XX || COMPILE_TEST
	depends on DMADEVICES
	select DMA_ENGINE
	help
	  Say Y here to support the ARASAN CompactFlash PATA controller

config PATA_ARTOP
	tristate "ARTOP 6210/6260 PATA support"
	depends on PCI
	help
	  This option enables support for ARTOP PATA controllers.

	  If unsure, say N.

config PATA_ATIIXP
	tristate "ATI P                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          