Move VDD-MIN/MAX to Kconfig

file:6d8b975282c4178afc32b15ed99e6000bcb6cad3 -> file:6bbe3abc63beb6d588f18d0305fbe33a055ffc1b
--- a/arch/arm/mach-msm/acpuclock-8x60.c
+++ b/arch/arm/mach-msm/acpuclock-8x60.c
@@ -45,10 +45,10 @@
#define L_VAL_SCPLL_CAL_MIN 0x08 /* = 432 MHz with 27MHz source */
#define L_VAL_SCPLL_CAL_MAX 0x22 /* = 1836 MHz with 27MHz source */
-#define MIN_VDD_SC 700000 /* uV */
-#define MAX_VDD_SC 1600000 /* uV */
-#define MAX_VDD_MEM 1600000 /* uV */
-#define MAX_VDD_DIG 1600000 /* uV */
+#define MIN_VDD_SC CONFIG_CPU_FREQ_MIN_VDD /* uV */
+#define MAX_VDD_SC CONFIG_CPU_FREQ_MAX_VDD /* uV */
+#define MAX_VDD_MEM CONFIG_CPU_FREQ_MAX_VDD /* uV */
+#define MAX_VDD_DIG CONFIG_CPU_FREQ_MAX_VDD /* uV */
#define MAX_AXI 310500 /* KHz */
#define SCPLL_LOW_VDD_FMAX 594000 /* KHz */
#define SCPLL_LOW_VDD 1000000 /* uV */
file:d938dd47521ac9bec7852279e35610e71aa27107 -> file:2dfc668086ffed4f7b2bb1be027f3ad42b0c255b
--- a/arch/arm/mach-msm/avs.h
+++ b/arch/arm/mach-msm/avs.h
@@ -14,10 +14,6 @@
#ifndef AVS_H
#define AVS_H
-#define VOLTAGE_MIN 700 /* mV */
-#define VOLTAGE_MAX 1600
-#define VOLTAGE_STEP 25
-
int __init avs_init(int (*set_vdd)(int), u32 freq_cnt, u32 freq_idx);
void __exit avs_exit(void);
file:3061ffdf5c394ba0da0178a22e720da0a97deade -> file:fb00aa385377d6cbbd8841fb08a693f14a49b64f
--- a/arch/arm/mach-msm/board-vigor.c
+++ b/arch/arm/mach-msm/board-vigor.c
@@ -503,8 +503,8 @@ static struct regulator_init_data saw_s0
.constraints = {
.name = "8901_s0",
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
- .min_uV = 700000,
- .max_uV = 1600000,
+ .min_uV = CONFIG_CPU_FREQ_MIN_VDD,
+ .max_uV = CONFIG_CPU_FREQ_MAX_VDD,
},
.consumer_supplies = vreg_consumers_8901_S0,
.num_consumer_supplies = ARRAY_SIZE(vreg_consumers_8901_S0),
@@ -514,8 +514,8 @@ static struct regulator_init_data saw_s1
.constraints = {
.name = "8901_s1",
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
- .min_uV = 700000,
- .max_uV = 1600000,
+ .min_uV = CONFIG_CPU_FREQ_MIN_VDD,
+ .max_uV = CONFIG_CPU_FREQ_MAX_VDD,
},
.consumer_supplies = vreg_consumers_8901_S1,
.num_consumer_supplies = ARRAY_SIZE(vreg_consumers_8901_S1),
@@ -3802,8 +3802,8 @@ static struct regulator_consumer_supply
/* RPM early regulator constraints */
static struct rpm_regulator_init_data rpm_regulator_early_init_data[] = {
/* ID a_on pd ss min_uV max_uV init_ip freq */
- RPM_SMPS(PM8058_S0, 0, 1, 1, 500000, 1400000, SMPS_HMIN, 1p92),
- RPM_SMPS(PM8058_S1, 0, 1, 1, 500000, 1400000, SMPS_HMIN, 1p92),
+ RPM_SMPS(PM8058_S0, 0, 1, 1, 500000, CONFIG_CPU_FREQ_MAX_VDD, SMPS_HMIN, 1p92),
+ RPM_SMPS(PM8058_S1, 0, 1, 1, 500000, CONFIG_CPU_FREQ_MAX_VDD, SMPS_HMIN, 1p92),
};
/* RPM regulator constraints */
file:5eabf405bb57e63456419a33fb9a4a9eb05f36f3 -> file:2f0ba4f84e93f02a5af1272577f619b438a12e96
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -298,6 +298,18 @@ config VDD_USERSPACE
exposes the VDD table to userspace
allows users to adjust voltages on the fly
+config CPU_FREQ_MIN_VDD
+ int "Minimum VDD (uV)"
+ default 700000
+ help
+ Minimum VDD level in uV
+
+config CPU_FREQ_MAX_VDD
+ int "Maximum VDD (uV)"
+ default 1400000
+ help
+ Maximum VDD level in uV
+
menu "x86 CPU frequency scaling drivers"
depends on X86
source "drivers/cpufreq/Kconfig.x86"