Commit 4f111beb authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Handle CPUFREQ_RESUMECHANGE notifications

Notifications in i386, sparc64, x86_64, sh-sci and sa11xx-pcmcia notifiers.
sa1100-framebuffer doesn't seem to be able to handle frequency transitions
behind its back well. So, sa11xx will be marked
CPUFREQ_PANIC_OUTOFSYNC | CPUFREQ_PANIC_RESUME_OUTOFSYNC later.
parent ceccad84
......@@ -356,7 +356,8 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
}
if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
(val == CPUFREQ_RESUMECHANGE)) {
if (variable_tsc)
cpu_data[freq->cpu].loops_per_jiffy = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
#ifndef CONFIG_SMP
......
......@@ -1035,7 +1035,8 @@ static int sparc64_cpufreq_notifier(struct notifier_block *nb, unsigned long val
ft->clock_tick_ref = cpu_data(cpu).clock_tick;
}
if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
(val == CPUFREQ_RESUMECHANGE)) {
cpu_data(cpu).udelay_val =
cpufreq_scale(ft->udelay_val_ref,
ft->ref_freq,
......
......@@ -531,7 +531,8 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
cpu_khz_ref = cpu_khz;
}
if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
(val == CPUFREQ_RESUMECHANGE)) {
*lpj =
cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
......
......@@ -1239,7 +1239,8 @@ static int sci_notifier(struct notifier_block *self, unsigned long phase, void *
struct cpufreq_freqs *freqs = p;
int i;
if (phase == CPUFREQ_POSTCHANGE) {
if ((phase == CPUFREQ_POSTCHANGE) ||
(phase == CPUFREQ_RESUMECHANGE)) {
for (i = 0; i < SCI_NPORTS; i++) {
/*
* This will force a baud rate change in hardware.
......
......@@ -933,6 +933,8 @@ sa1100_pcmcia_notifier(struct notifier_block *nb, unsigned long val,
if (freqs->new < freqs->old)
sa1100_pcmcia_update_mecr(freqs->new);
break;
case CPUFREQ_RESUMECHANGE:
sa1100_pcmcia_update_mecr(freqs->new);
}
return 0;
......
......@@ -758,7 +758,8 @@ static int sci_notifier(struct notifier_block *self, unsigned long phase, void *
struct cpufreq_freqs *freqs = p;
int i;
if (phase == CPUFREQ_POSTCHANGE) {
if ((phase == CPUFREQ_POSTCHANGE) ||
(phase == CPUFREQ_RESUMECHANGE)){
for (i = 0; i < SCI_NPORTS; i++) {
struct uart_port *port = &sci_ports[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment