#
# ARM CPU Frequency scaling drivers
#

# big LITTLE core layer and glue drivers
config ARM_BIG_LITTLE_CPUFREQ
	tristate "Generic ARM big LITTLE CPUfreq driver"
	depends on (ARM_CPU_TOPOLOGY || ARM64) && HAVE_CLK
	# if CPU_THERMAL is on and THERMAL=m, ARM_BIT_LITTLE_CPUFREQ cannot be =y
	depends on !CPU_THERMAL || THERMAL
	select PM_OPP
	help
	  This enables the Generic CPUfreq driver for ARM big.LITTLE platforms.

config ARM_BRCMSTB_AVS_CPUFREQ
	tristate "Broadcom STB AVS CPUfreq driver"
	depends on ARCH_BRCMSTB || COMPILE_TEST
	default y
	help
	  Some Broadcom STB SoCs use a co-processor running proprietary firmware
	  ("AVS") to handle voltage and frequency scaling. This driver provides
	  a standard CPUfreq interface to to the firmware.

	  Say Y, if you have a Broadcom SoC with AVS support for DFS or DVFS.

config ARM_BRCMSTB_AVS_CPUFREQ_DEBUG
	bool "Broadcom STB AVS CPUfreq driver sysfs debug capability"
	depends on ARM_BRCMSTB_AVS_CPUFREQ
	help
	  Enabling this option turns on debug support via sysfs under
	  /sys/kernel/debug/brcmstb-avs-cpufreq. It is possible to read all and
	  write some AVS mailbox registers through sysfs entries.

	  If in doubt, say N.

config ARM_DT_BL_CPUFREQ
	tristate "Generic probing via DT for ARM big LITTLE CPUfreq driver"
	depends on ARM_BIG_LITTLE_CPUFREQ && OF
	help
	  This enables probing via DT for Generic CPUfreq driver for ARM
	  big.LITTLE platform. This gets frequency tables from DT.

config ARM_VEXPRESS_SPC_CPUFREQ
        tristate "Versatile Express SPC based CPUfreq driver"
	depends on ARM_BIG_LITTLE_CPUFREQ && ARCH_VEXPRESS_SPC
        help
          This add the CPUfreq driver support for Versatile Express
	  big.LITTLE platforms using SPC for power management.

config ARM_EXYNOS5440_CPUFREQ
	tristate "SAMSUNG EXYNOS5440"
	depends on SOC_EXYNOS5440
	depends on HAVE_CLK && OF
	select PM_OPP
	default y
	help
	  This adds the CPUFreq driver for Samsung EXYNOS5440
	  SoC. The nature of exynos5440 clock controller is
	  different than previous exynos controllers so not using
	  the common exynos framework.

	  If in doubt, say N.

config ARM_HIGHBANK_CPUFREQ
	tristate "Calxeda Highbank-based"
	depends on ARCH_HIGHBANK && CPUFREQ_DT && REGULATOR
	default m
	help
	  This adds the CPUFreq driver for Calxeda Highbank SoC
	  based boards.

	  If in doubt, say N.

config ARM_IMX6Q_CPUFREQ
	tristate "Freescale i.MX6 cpufreq support"
	depends on ARCH_MXC
	depends on REGULATOR_ANATOP
	select PM_OPP
	help
	  This adds cpufreq driver support for Freescale i.MX6 series SoCs.

	  If in doubt, say N.

config ARM_KIRKWOOD_CPUFREQ
	def_bool MACH_KIRKWOOD
	help
	  This adds the CPUFreq driver for Marvell Kirkwood
	  SoCs.

config ARM_MT8173_CPUFREQ
	tristate "Mediatek MT8173 CPUFreq support"
	depends on ARCH_MEDIATEK && REGULATOR
	depends on ARM64 || (ARM_CPU_TOPOLOGY && COMPILE_TEST)
	depends on !CPU_THERMAL || THERMAL
	select PM_OPP
	help
	  This adds the CPUFreq driver support for Mediatek MT8173 SoC.

config ARM_OMAP2PLUS_CPUFREQ
	bool "TI OMAP2+"
	depends on ARCH_OMAP2PLUS
	default ARCH_OMAP2PLUS

config ARM_S3C_CPUFREQ
	bool
	help
	  Internal configuration node for common cpufreq on Samsung SoC

config ARM_S3C24XX_CPUFREQ
	bool "CPUfreq driver for Samsung S3C24XX series CPUs (EXPERIMENTAL)"
	depends on ARCH_S3C24XX
	select ARM_S3C_CPUFREQ
	help
	  This enables the CPUfreq driver for the Samsung S3C24XX family
	  of CPUs.

	  For details, take a look at <file:Documentation/cpu-freq>.

	  If in doubt, say N.

config ARM_S3C24XX_CPUFREQ_DEBUG
	bool "Debug CPUfreq Samsung driver core"
	depends on ARM_S3C24XX_CPUFREQ
	help
	  Enable s3c_freq_dbg for the Samsung S3C CPUfreq core

config ARM_S3C24XX_CPUFREQ_IODEBUG
	bool "Debug CPUfreq Samsung driver IO timing"
	depends on ARM_S3C24XX_CPUFREQ
	help
	  Enable s3c_freq_iodbg for the Samsung S3C CPUfreq core

config ARM_S3C24XX_CPUFREQ_DEBUGFS
	bool "Export debugfs for CPUFreq"
	depends on ARM_S3C24XX_CPUFREQ && DEBUG_FS
	help
	  Export status information via debugfs.

config ARM_S3C2410_CPUFREQ
	bool
	depends on ARM_S3C24XX_CPUFREQ && CPU_S3C2410
	select S3C2410_CPUFREQ_UTILS
	help
	  CPU Frequency scaling support for S3C2410

config ARM_S3C2412_CPUFREQ
	bool
	depends on ARM_S3C24XX_CPUFREQ && CPU_S3C2412
	default y
	select S3C2412_IOTIMING
	help
	  CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs.

config ARM_S3C2416_CPUFREQ
	bool "S3C2416 CPU Frequency scaling support"
	depends on CPU_S3C2416
	help
	  This adds the CPUFreq driver for the Samsung S3C2416 and
	  S3C2450 SoC. The S3C2416 supports changing the rate of the
	  armdiv clock source and also entering a so called dynamic
	  voltage scaling mode in which it is possible to reduce the
	  core voltage of the CPU.

	  If in doubt, say N.

config ARM_S3C2416_CPUFREQ_VCORESCALE
	bool "Allow voltage scaling for S3C2416 arm core"
	depends on ARM_S3C2416_CPUFREQ && REGULATOR
	help
	  Enable CPU voltage scaling when entering the dvs mode.
	  It uses information gathered through existing hardware and
	  tests but not documented in any datasheet.

	  If in doubt, say N.

config ARM_S3C2440_CPUFREQ
	bool "S3C2440/S3C2442 CPU Frequency scaling support"
	depends on ARM_S3C24XX_CPUFREQ && (CPU_S3C2440 || CPU_S3C2442)
	select S3C2410_CPUFREQ_UTILS
	default y
	help
	  CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs.

config ARM_S3C64XX_CPUFREQ
	bool "Samsung S3C64XX"
	depends on CPU_S3C6410
	default y
	help
	  This adds the CPUFreq driver for Samsung S3C6410 SoC.

	  If in doubt, say N.

config ARM_S5PV210_CPUFREQ
	bool "Samsung S5PV210 and S5PC110"
	depends on CPU_S5PV210
	default y
	help
	  This adds the CPUFreq driver for Samsung S5PV210 and
	  S5PC110 SoCs.

	  If in doubt, say N.

config ARM_SA1100_CPUFREQ
	bool

config ARM_SA1110_CPUFREQ
	bool

config ARM_SCPI_CPUFREQ
        tristate "SCPI based CPUfreq driver"
	depends on ARM_BIG_LITTLE_CPUFREQ && ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI
        help
	  This adds the CPUfreq driver support for ARM big.LITTLE platforms
	  using SCPI protocol for CPU power management.

	  This driver uses SCPI Message Protocol driver to interact with the
	  firmware providing the CPU DVFS functionality.

config ARM_SPEAR_CPUFREQ
	bool "SPEAr CPUFreq support"
	depends on PLAT_SPEAR
	default y
	help
	  This adds the CPUFreq driver support for SPEAr SOCs.

config ARM_STI_CPUFREQ
	tristate "STi CPUFreq support"
	depends on SOC_STIH407
	help
	  This driver uses the generic OPP framework to match the running
	  platform with a predefined set of suitable values.  If not provided
	  we will fall-back so safe-values contained in Device Tree.  Enable
	  this config option if you wish to add CPUFreq support for STi based
	  SoCs.

config ARM_TEGRA20_CPUFREQ
	bool "Tegra20 CPUFreq support"
	depends on ARCH_TEGRA
	default y
	help
	  This adds the CPUFreq driver support for Tegra20 SOCs.

config ARM_TEGRA124_CPUFREQ
	tristate "Tegra124 CPUFreq support"
	depends on ARCH_TEGRA && CPUFREQ_DT && REGULATOR
	default y
	help
	  This adds the CPUFreq driver support for Tegra124 SOCs.

config ARM_PXA2xx_CPUFREQ
	tristate "Intel PXA2xx CPUfreq driver"
	depends on PXA27x || PXA25x
	help
	  This add the CPUFreq driver support for Intel PXA2xx SOCs.

	  If in doubt, say N.

config ACPI_CPPC_CPUFREQ
	tristate "CPUFreq driver based on the ACPI CPPC spec"
	depends on ACPI
	select ACPI_CPPC_LIB
	default n
	help
	  This adds a CPUFreq driver which uses CPPC methods
	  as described in the ACPIv5.1 spec. CPPC stands for
	  Collaborative Processor Performance Controls. It
	  is based on an abstract continuous scale of CPU
	  performance values which allows the remote power
	  processor to flexibly optimize for power and
	  performance. CPPC relies on power management firmware
	  support for its operation.

	  If in doubt, say N.
