]> git.hungrycats.org Git - linux/commitdiff
[CPUFREQ] Handle CPUFREQ_RESUMECHANGE notifications
authorDave Jones <davej@redhat.com>
Fri, 7 May 2004 16:17:28 +0000 (17:17 +0100)
committerDave Jones <davej@delerium.codemonkey.org.uk>
Fri, 7 May 2004 16:17:28 +0000 (17:17 +0100)
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.

arch/i386/kernel/timers/timer_tsc.c
arch/sparc64/kernel/time.c
arch/x86_64/kernel/time.c
drivers/char/sh-sci.c
drivers/pcmcia/sa11xx_core.c
drivers/serial/sh-sci.c

index 907d2efa6a12b5e8dc7e56c4bd75ea77013636dc..f1b50893c2377cd1231c4315eb1777f15eaaea7f 100644 (file)
@@ -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
index 57ebd69e5c79d464a8397b8d3d9571ccd1edb6af..06e1579f0614368301670de27bf3d7752280b113 100644 (file)
@@ -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,
index 39fe36fa893a58632cc944218e5cc96a17aeafb5..0267ef61bd8102fc42a227d4694f4f3e968c4fff 100644 (file)
@@ -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);
 
index d3894a6f9cd68d40995d037675b4294ae465a050..0eece5a7cbbe87bb7dd18f9c420ae8dcd8456daf 100644 (file)
@@ -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.
index d7249c033ec8329861ec7c7d9356de0310bc51a3..a8e35a58b23f50393d7eff690ba43ffa686e0b61 100644 (file)
@@ -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;
index 14d5c8abd9f389cc99e876b6247c75e5911bb64f..28d9750a823ffa4dd042f4492a41aa5ee801463f 100644 (file)
@@ -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];