--- a/arch/arm/mach-msm/acpuclock-8x60.c
+++ b/arch/arm/mach-msm/acpuclock-8x60.c
@@ -89,10 +89,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 1400000 /* uV */
-#define MAX_VDD_MEM 1400000 /* uV */
-#define MAX_VDD_DIG 1200000 /* 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 */
--- 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 1400
-#define VOLTAGE_STEP 25
-
int __init avs_init(int (*set_vdd)(int), u32 freq_cnt, u32 freq_idx);
void __exit avs_exit(void);
--- a/arch/arm/mach-msm/board-shooter_u.c
+++ b/arch/arm/mach-msm/board-shooter_u.c
@@ -454,8 +454,8 @@ static struct regulator_init_data saw_s0
.constraints = {
.name = "8901_s0",
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
- .min_uV = 700000,
- .max_uV = 1400000,
+ .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),
@@ -465,8 +465,8 @@ static struct regulator_init_data saw_s1
.constraints = {
.name = "8901_s1",
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
- .min_uV = 700000,
- .max_uV = 1400000,
+ .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),
@@ -2838,8 +2838,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 */
--- 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"