aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorKasper Hettinga <kasper.hettinga@gmail.com>2012-10-27 18:38:27 +0200
committerPawit Pornkitprasan <p.pawit@gmail.com>2012-10-30 10:05:12 +0700
commit559b0da2041036d37fd49b06a4254c8ef2834a54 (patch)
tree7c9d9198637648355172b8e2c619dca31cc0c9dd /arch/arm
parent3d6851e4b7c574ddc22757ff6fa47a014e4ed67a (diff)
downloadkernel_samsung_aries-559b0da2041036d37fd49b06a4254c8ef2834a54.zip
kernel_samsung_aries-559b0da2041036d37fd49b06a4254c8ef2834a54.tar.gz
kernel_samsung_aries-559b0da2041036d37fd49b06a4254c8ef2834a54.tar.bz2
Add ability to under- and overvolt.
Patch set 1: original commit Patch set 2: removed spaces Patch set 3: increased stock voltage at 1200MHz to 1325mV Patch set 4: changed UV interface to allow OV with Voltage Control Patch set 5: spacing Patch set 6: rebased Patch set 7: allow higher OV voltage Change-Id: Ie5f5d8ca7ed64e63b9be0aa088b99c1b8466b605
Diffstat (limited to 'arch/arm')
-rwxr-xr-xarch/arm/mach-s5pv210/cpufreq.c43
-rw-r--r--arch/arm/mach-s5pv210/mach-aries.c2
2 files changed, 42 insertions, 3 deletions
diff --git a/arch/arm/mach-s5pv210/cpufreq.c b/arch/arm/mach-s5pv210/cpufreq.c
index 1f3f9a5..67f811e 100755
--- a/arch/arm/mach-s5pv210/cpufreq.c
+++ b/arch/arm/mach-s5pv210/cpufreq.c
@@ -98,12 +98,12 @@ static unsigned int g_dvfslockval[DVFS_LOCK_TOKEN_NUM];
//static DEFINE_MUTEX(dvfs_high_lock);
#endif
-const unsigned long arm_volt_max = 1350000;
+const unsigned long arm_volt_max = 1400000;
const unsigned long int_volt_max = 1250000;
static struct s5pv210_dvs_conf dvs_conf[] = {
[OC0] = {
- .arm_volt = 1275000,
+ .arm_volt = 1325000,
.int_volt = 1100000,
},
[L0] = {
@@ -777,3 +777,42 @@ static int __init s5pv210_cpufreq_init(void)
}
late_initcall(s5pv210_cpufreq_init);
+
+ssize_t show_UV_mV_table(struct cpufreq_policy *policy, char *buf)
+{
+ int i, len = 0;
+ for (i = 0; i <= MAX_PERF_LEVEL; i++) {
+ len += sprintf(buf + len, "%dmhz: %d mV\n", s5pv210_freq_table[i].frequency / 1000, dvs_conf[i].arm_volt / 1000);
+ }
+ return len;
+}
+
+ssize_t store_UV_mV_table(struct cpufreq_policy *policy,
+ const char *buf, size_t count)
+{
+ int ret = -EINVAL;
+ int i = 0;
+ int j = 0;
+ int u[MAX_PERF_LEVEL + 1];
+ while (j < MAX_PERF_LEVEL + 1) {
+ int consumed;
+ int val;
+ ret = sscanf(buf, "%d%n", &val, &consumed);
+ if (ret > 0) {
+ buf += consumed;
+ u[j++] = val;
+ }
+ else {
+ break;
+ }
+ }
+
+ for (i = 0; i < j; i++) {
+ if (u[i] > arm_volt_max / 1000) {
+ u[i] = arm_volt_max / 1000;
+ }
+ dvs_conf[i].arm_volt = u[i] * 1000;
+ }
+
+ return count;
+}
diff --git a/arch/arm/mach-s5pv210/mach-aries.c b/arch/arm/mach-s5pv210/mach-aries.c
index 15fff7c..c41199f 100644
--- a/arch/arm/mach-s5pv210/mach-aries.c
+++ b/arch/arm/mach-s5pv210/mach-aries.c
@@ -413,7 +413,7 @@ static struct s5p_media_device aries_media_devs[] = {
static struct s5pv210_cpufreq_voltage smdkc110_cpufreq_volt[] = {
{
.freq = 1200000,
- .varm = 1275000,
+ .varm = 1325000,
.vint = 1100000,
}, {
.freq = 1000000,