Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258582
b: refs/heads/master
c: 90d5d0a
h: refs/heads/master
v: v3
  • Loading branch information
Huisung Kang authored and Dave Jones committed Jul 13, 2011
1 parent 881ad6f commit fef0ade
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb3b1fefaaccdbdc716db0963ba41fb6b4221e60
refs/heads/master: 90d5d0a119bcf189e8b33f776b4f8371b789b311
28 changes: 28 additions & 0 deletions trunk/drivers/cpufreq/s5pv210-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ static struct cpufreq_freqs freqs;
#define APLL_VAL_1000 ((1 << 31) | (125 << 16) | (3 << 8) | 1)
#define APLL_VAL_800 ((1 << 31) | (100 << 16) | (3 << 8) | 1)

/*
* relation has an additional symantics other than the standard of cpufreq
* DISALBE_FURTHER_CPUFREQ: disable further access to target
* ENABLE_FURTUER_CPUFREQ: enable access to target
*/
enum cpufreq_access {
DISABLE_FURTHER_CPUFREQ = 0x10,
ENABLE_FURTHER_CPUFREQ = 0x20,
};

static bool no_cpufreq_access;

/*
* DRAM configurations to calculate refresh counter for changing
* frequency of memory.
Expand Down Expand Up @@ -146,6 +158,22 @@ static int s5pv210_target(struct cpufreq_policy *policy,
unsigned int pll_changing = 0;
unsigned int bus_speed_changing = 0;

if (relation & ENABLE_FURTHER_CPUFREQ)
no_cpufreq_access = false;

if (no_cpufreq_access) {
#ifdef CONFIG_PM_VERBOSE
pr_err("%s:%d denied access to %s as it is disabled"
"temporarily\n", __FILE__, __LINE__, __func__);
#endif
return -EINVAL;
}

if (relation & DISABLE_FURTHER_CPUFREQ)
no_cpufreq_access = true;

relation &= ~(ENABLE_FURTHER_CPUFREQ | DISABLE_FURTHER_CPUFREQ);

freqs.old = s5pv210_getspeed(0);

if (cpufreq_frequency_table_target(policy, s5pv210_freq_table,
Expand Down

0 comments on commit fef0ade

Please sign in to comment.