Initial OC-UV

file:8bf5e0e0a9a3e50e08a01e9e57d4f5cdae63cb74 -> file:8871caa741eb11990cd9e4198e126163b73a8543
--- a/arch/arm/mach-msm/acpuclock-8960.c
+++ b/arch/arm/mach-msm/acpuclock-8960.c
@@ -71,7 +71,7 @@
#define STBY_KHZ 1
#define HFPLL_NOMINAL_VDD 1050000
-#define HFPLL_LOW_VDD 850000
+#define HFPLL_LOW_VDD 800000
#define HFPLL_LOW_VDD_PLL_L_MAX 0x28
#define SECCLKAGD BIT(4)
@@ -144,7 +144,7 @@ static struct scalable scalable_8960[] =
.hfpll_base = MSM_HFPLL_BASE + 0x200,
.aux_clk_sel = MSM_ACC0_BASE + 0x014,
.l2cpmr_iaddr = L2CPUCPMR_IADDR,
- .vreg[VREG_CORE] = { "krait0", 1300000 },
+ .vreg[VREG_CORE] = { "krait0", 1350000 },
.vreg[VREG_MEM] = { "krait0_mem", 1150000,
RPM_VREG_VOTER1,
RPM_VREG_ID_PM8921_L24 },
@@ -162,7 +162,7 @@ static struct scalable scalable_8960[] =
.hfpll_base = MSM_HFPLL_BASE + 0x300,
.aux_clk_sel = MSM_ACC1_BASE + 0x014,
.l2cpmr_iaddr = L2CPUCPMR_IADDR,
- .vreg[VREG_CORE] = { "krait1", 1300000 },
+ .vreg[VREG_CORE] = { "krait1", 1350000 },
.vreg[VREG_MEM] = { "krait0_mem", 1150000,
RPM_VREG_VOTER2,
RPM_VREG_ID_PM8921_L24 },
@@ -383,6 +383,7 @@ static struct msm_bus_paths bw_level_tbl
[4] = BW_MBPS(3200), /* At least 400 MHz on bus. */
[5] = BW_MBPS(3600), /* At least 450 MHz on bus. */
[6] = BW_MBPS(3936), /* At least 492 MHz on bus. */
+ [7] = BW_MBPS(4264), /* At least 533 MHz on bus. */
};
static struct msm_bus_scale_pdata bus_client_pdata = {
@@ -740,10 +741,10 @@ static struct l2_level l2_freq_tbl_8960_
[13] = { { 1026000, HFPLL, 1, 0, 0x26 }, 1150000, 1150000, 6 },
[14] = { { 1080000, HFPLL, 1, 0, 0x28 }, 1150000, 1150000, 6 },
[15] = { { 1134000, HFPLL, 1, 0, 0x2A }, 1150000, 1150000, 6 },
- [16] = { { 1188000, HFPLL, 1, 0, 0x2C }, 1150000, 1150000, 6 },
- [17] = { { 1242000, HFPLL, 1, 0, 0x2E }, 1150000, 1150000, 6 },
- [18] = { { 1296000, HFPLL, 1, 0, 0x30 }, 1150000, 1150000, 6 },
- [19] = { { 1350000, HFPLL, 1, 0, 0x32 }, 1150000, 1150000, 6 },
+ [16] = { { 1188000, HFPLL, 1, 0, 0x2C }, 1150000, 1150000, 7 },
+ [17] = { { 1242000, HFPLL, 1, 0, 0x2E }, 1150000, 1150000, 7 },
+ [18] = { { 1296000, HFPLL, 1, 0, 0x30 }, 1150000, 1150000, 7 },
+ [19] = { { 1350000, HFPLL, 1, 0, 0x32 }, 1150000, 1150000, 7 },
};
static struct acpu_level acpu_freq_tbl_8960_kraitv2_slow[] = {
@@ -774,37 +775,41 @@ static struct acpu_level acpu_freq_tbl_8
};
static struct acpu_level acpu_freq_tbl_8960_kraitv2_nom[] = {
- { 0, { STBY_KHZ, QSB, 0, 0, 0x00 }, L2(0), 900000 },
- { 1, { 384000, PLL_8, 0, 2, 0x00 }, L2(1), 900000 },
- { 0, { 432000, HFPLL, 2, 0, 0x20 }, L2(7), 925000 },
- { 1, { 486000, HFPLL, 2, 0, 0x24 }, L2(7), 925000 },
- { 0, { 540000, HFPLL, 2, 0, 0x28 }, L2(7), 950000 },
- { 1, { 594000, HFPLL, 1, 0, 0x16 }, L2(7), 950000 },
- { 0, { 648000, HFPLL, 1, 0, 0x18 }, L2(7), 975000 },
- { 1, { 702000, HFPLL, 1, 0, 0x1A }, L2(7), 975000 },
- { 0, { 756000, HFPLL, 1, 0, 0x1C }, L2(7), 1025000 },
- { 1, { 810000, HFPLL, 1, 0, 0x1E }, L2(7), 1025000 },
- { 0, { 864000, HFPLL, 1, 0, 0x20 }, L2(7), 1050000 },
- { 1, { 918000, HFPLL, 1, 0, 0x22 }, L2(7), 1050000 },
- { 0, { 972000, HFPLL, 1, 0, 0x24 }, L2(7), 1075000 },
- { 1, { 1026000, HFPLL, 1, 0, 0x26 }, L2(7), 1075000 },
- { 0, { 1080000, HFPLL, 1, 0, 0x28 }, L2(16), 1125000 },
- { 1, { 1134000, HFPLL, 1, 0, 0x2A }, L2(16), 1125000 },
- { 0, { 1188000, HFPLL, 1, 0, 0x2C }, L2(16), 1150000 },
- { 1, { 1242000, HFPLL, 1, 0, 0x2E }, L2(16), 1150000 },
- { 0, { 1296000, HFPLL, 1, 0, 0x30 }, L2(16), 1175000 },
- { 1, { 1350000, HFPLL, 1, 0, 0x32 }, L2(16), 1175000 },
- { 0, { 1404000, HFPLL, 1, 0, 0x34 }, L2(16), 1187500 },
- { 1, { 1458000, HFPLL, 1, 0, 0x36 }, L2(16), 1187500 },
- { 1, { 1512000, HFPLL, 1, 0, 0x38 }, L2(16), 1200000 },
+ { 0, { STBY_KHZ, QSB, 0, 0, 0x00 }, L2(0), 800000 },
+ { 1, { 384000, PLL_8, 0, 2, 0x00 }, L2(1), 800000 },
+ { 0, { 432000, HFPLL, 2, 0, 0x20 }, L2(7), 825000 },
+ { 1, { 486000, HFPLL, 2, 0, 0x24 }, L2(7), 850000 },
+ { 0, { 540000, HFPLL, 2, 0, 0x28 }, L2(7), 850000 },
+ { 1, { 594000, HFPLL, 1, 0, 0x16 }, L2(7), 850000 },
+ { 0, { 648000, HFPLL, 1, 0, 0x18 }, L2(7), 900000 },
+ { 1, { 702000, HFPLL, 1, 0, 0x1A }, L2(7), 900000 },
+ { 0, { 756000, HFPLL, 1, 0, 0x1C }, L2(7), 950000 },
+ { 1, { 810000, HFPLL, 1, 0, 0x1E }, L2(7), 950000 },
+ { 0, { 864000, HFPLL, 1, 0, 0x20 }, L2(7), 975000 },
+ { 1, { 918000, HFPLL, 1, 0, 0x22 }, L2(7), 975000 },
+ { 0, { 972000, HFPLL, 1, 0, 0x24 }, L2(7), 1025000 },
+ { 1, { 1026000, HFPLL, 1, 0, 0x26 }, L2(7), 1025000 },
+ { 0, { 1080000, HFPLL, 1, 0, 0x28 }, L2(16), 1050000 },
+ { 1, { 1134000, HFPLL, 1, 0, 0x2A }, L2(16), 1050000 },
+ { 0, { 1188000, HFPLL, 1, 0, 0x2C }, L2(16), 1075000 },
+ { 1, { 1242000, HFPLL, 1, 0, 0x2E }, L2(16), 1075000 },
+ { 0, { 1296000, HFPLL, 1, 0, 0x30 }, L2(16), 1125000 },
+ { 1, { 1350000, HFPLL, 1, 0, 0x32 }, L2(16), 1125000 },
+ { 0, { 1404000, HFPLL, 1, 0, 0x34 }, L2(16), 1125000 },
+ { 1, { 1458000, HFPLL, 1, 0, 0x36 }, L2(16), 1150000 },
+ { 1, { 1512000, HFPLL, 1, 0, 0x38 }, L2(18), 1150000 },
+ { 1, { 1674000, HFPLL, 1, 0, 0x3A }, L2(18), 1200000 },
+ { 1, { 1728000, HFPLL, 1, 0, 0x3C }, L2(19), 1200000 },
+ { 1, { 1809000, HFPLL, 1, 0, 0x3E }, L2(19), 1250000 },
+ { 1, { 1900000, HFPLL, 1, 0, 0x40 }, L2(19), 1300000 },
{ 0, { 0 } }
};
static struct acpu_level acpu_freq_tbl_8960_kraitv2_fast[] = {
{ 0, { STBY_KHZ, QSB, 0, 0, 0x00 }, L2(0), 850000 },
{ 1, { 384000, PLL_8, 0, 2, 0x00 }, L2(1), 850000 },
- { 0, { 432000, HFPLL, 2, 0, 0x20 }, L2(7), 875000 },
- { 1, { 486000, HFPLL, 2, 0, 0x24 }, L2(7), 875000 },
+ { 0, { 432000, HFPLL, 2, 0, 0x20 }, L2(7), 850000 },
+ { 1, { 486000, HFPLL, 2, 0, 0x24 }, L2(7), 850000 },
{ 0, { 540000, HFPLL, 2, 0, 0x28 }, L2(7), 900000 },
{ 1, { 594000, HFPLL, 1, 0, 0x16 }, L2(7), 900000 },
{ 0, { 648000, HFPLL, 1, 0, 0x18 }, L2(7), 925000 },
@@ -821,9 +826,13 @@ static struct acpu_level acpu_freq_tbl_8
{ 1, { 1242000, HFPLL, 1, 0, 0x2E }, L2(16), 1100000 },
{ 0, { 1296000, HFPLL, 1, 0, 0x30 }, L2(16), 1125000 },
{ 1, { 1350000, HFPLL, 1, 0, 0x32 }, L2(16), 1125000 },
- { 0, { 1404000, HFPLL, 1, 0, 0x34 }, L2(16), 1137500 },
+ { 0, { 1404000, HFPLL, 1, 0, 0x34 }, L2(16), 1125000 },
{ 1, { 1458000, HFPLL, 1, 0, 0x36 }, L2(16), 1137500 },
- { 1, { 1512000, HFPLL, 1, 0, 0x38 }, L2(16), 1150000 },
+ { 1, { 1512000, HFPLL, 1, 0, 0x38 }, L2(18), 1150000 },
+ { 1, { 1674000, HFPLL, 1, 0, 0x3A }, L2(18), 1175000 },
+ { 1, { 1728000, HFPLL, 1, 0, 0x3C }, L2(19), 1200000 },
+ { 1, { 1809000, HFPLL, 1, 0, 0x3E }, L2(19), 1250000 },
+ { 1, { 1998000, HFPLL, 1, 0, 0x42 }, L2(19), 1300000 },
{ 0, { 0 } }
};
@@ -1553,7 +1562,7 @@ static void __init bus_init(unsigned int
}
#ifdef CONFIG_CPU_FREQ_MSM
-static struct cpufreq_frequency_table freq_table[NR_CPUS][30];
+static struct cpufreq_frequency_table freq_table[NR_CPUS][34];
static void __init cpufreq_table_init(void)
{
@@ -1703,51 +1712,15 @@ static struct acpu_level * __init select
pr_alert("ACPU PVS:[%d],FMAX[%d]\n", pvs, fmax);
switch (pvs) {
- case 0x0:
- case 0x7:
- pr_alert("ACPU PVS: Slow(L%d)\n",
- pvs_leakage);
- v1 = acpu_freq_tbl_8960_kraitv1_slow;
- v2 = acpu_freq_tbl_8960_kraitv2_slow;
- break;
- case 0x1:
- pr_alert("ACPU PVS: Nominal(L%d)\n",
- pvs_leakage);
- v1 = acpu_freq_tbl_8960_kraitv1_nom_fast;
- v2 = acpu_freq_tbl_8960_kraitv2_nom;
- break;
- case 0x3:
- switch (fmax) {
- case 0x1:
- pr_alert("ACPU PVS: Fast1(L%d)\n",
- pvs_leakage);
- v1 = acpu_freq_tbl_8960_kraitv1_slow;
- v2 = acpu_freq_tbl_8960_kraitv2_fast;
- break;
- case 0x2:
- pr_alert("ACPU PVS: Fast2(L%d)\n",
- pvs_leakage);
- v1 = acpu_freq_tbl_8960_kraitv1_slow;
- v2 = acpu_freq_tbl_8960_kraitv2_fast;
- break;
- case 0x3:
- pr_alert("ACPU PVS: Fast3(L%d)\n",
- pvs_leakage);
- v1 = acpu_freq_tbl_8960_kraitv1_slow;
- v2 = acpu_freq_tbl_8960_kraitv2_f3;
- break;
- default:
- pr_info("ACPU PVS: Fast\n");
- v1 = acpu_freq_tbl_8960_kraitv1_nom_fast;
- v2 = acpu_freq_tbl_8960_kraitv2_fast;
- break;
- }
- break;
- default:
- pr_warn("ACPU PVS: Unknown. Defaulting to slow.\n");
- v1 = acpu_freq_tbl_8960_kraitv1_slow;
- v2 = acpu_freq_tbl_8960_kraitv2_slow;
- break;
+ case 0x0:
+ case 0x7:
+ case 0x1:
+ case 0x3:
+ default:
+ pr_alert("ACPU PVS: Fast\n");
+ v1 = acpu_freq_tbl_8960_kraitv1_nom_fast;
+ v2 = acpu_freq_tbl_8960_kraitv2_nom;
+ break;
}
#ifdef CONFIG_SEC_L1_DCACHE_PANIC_CHK
#if defined(CONFIG_MSM_DCVS_FOR_MSM8260A)
@@ -1795,9 +1768,11 @@ static struct acpu_level * __init select
kraitv2_apply_vmin(acpu_freq_tbl);
/* Find the max supported scaling frequency. */
- for (l = acpu_freq_tbl; l->speed.khz != 0; l++)
+ for (l = acpu_freq_tbl; l->speed.khz != 0; l++) {
if (l->use_for_scaling)
max_acpu_level = l;
+ if (l->speed.khz > 1458000) break;
+ }
BUG_ON(!max_acpu_level);
pr_info("Max ACPU freq: %u KHz\n", max_acpu_level->speed.khz);
file:9512f7eee1353517331ffd888a9d67973c39ac07 -> file:98091bd973cf6248d93bb83b66aa2c71154a70c5
--- a/arch/arm/mach-msm/board-8960-regulator.c
+++ b/arch/arm/mach-msm/board-8960-regulator.c
@@ -593,9 +593,9 @@ struct gpio_regulator_platform_data msm_
/* SAW regulator constraints */
struct regulator_init_data msm_saw_regulator_pdata_s5 =
/* ID vreg_name min_uV max_uV */
- SAW_VREG_INIT(S5, "8921_s5", 850000, 1300000);
+ SAW_VREG_INIT(S5, "8921_s5", 800000, 1350000);
struct regulator_init_data msm_saw_regulator_pdata_s6 =
- SAW_VREG_INIT(S6, "8921_s6", 850000, 1300000);
+ SAW_VREG_INIT(S6, "8921_s6", 800000, 1350000);
/* PM8921 regulator constraints */
struct pm8xxx_regulator_platform_data
file:5281c533746f977590e0e35f37aa6d3b5f789204 -> file:25fa11f7bb4610d4c8f372cd530fef1be6643f22
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1136,6 +1136,9 @@ static int cpufreq_add_dev(struct sys_de
pr_debug("initialization failed\n");
goto err_unlock_policy;
}
+
+ if (policy->max > 1512000) policy->max = 1512000;
+
policy->user_policy.min = policy->min;
policy->user_policy.max = policy->max;
file:f9b2e2a8bafe1e445a4684925fd1fe5291ecfc9b -> file:de69ebac30d545c60ed7bc2d5ad0257785739c53
--- a/drivers/thermal/msm_thermal.c
+++ b/drivers/thermal/msm_thermal.c
@@ -47,6 +47,7 @@ static int update_cpu_max_freq(struct cp
cpufreq_verify_within_limits(cpu_policy,
cpu_policy->min, max_freq);
+ if (max_freq > 1512000) max_freq = 1512000;
cpu_policy->user_policy.max = max_freq;
ret = cpufreq_update_policy(cpu);
@@ -93,9 +94,8 @@ static void check_temp(struct work_struc
} else if (temp < allowed_max_low) {
#ifdef CONFIG_SEC_DVFS
if (cpufreq_get_dvfs_state() != 1) {
- if (cpu_policy->max
- < cpu_policy->cpuinfo.max_freq) {
- max_freq = cpu_policy->cpuinfo.max_freq;
+ if (cpu_policy->max < 1512000) {
+ max_freq = 1512000;
update_policy = 1;
}
} else
file:4ddda96614d78e37441ce44967465a3a485e86f2 -> file:84a783dd9a57a3ca6024a27dacc22058f47b8ca2
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -353,7 +353,7 @@ static inline unsigned int cpufreq_quick
#define LOW_MAX_FREQ_LIMIT 1188000
#define MIN_FREQ_LIMIT 384000
-#define MAX_FREQ_LIMIT 1512000
+#define MAX_FREQ_LIMIT 1900000
enum {
SET_MIN = 0,