sh: intc: Handle legacy IRQ reservation in vector map.
[safe/jmp/linux-2.6] / arch / sh / kernel / cpufreq.c
index 675118d..dce4f3f 100644 (file)
 #include <linux/cpumask.h>
 #include <linux/smp.h>
 #include <linux/sched.h>       /* set_cpus_allowed() */
-#include <linux/io.h>
 #include <linux/clk.h>
-#include <asm/processor.h>
-#include <asm/watchdog.h>
-#include <asm/freq.h>
-#include <asm/clock.h>
 
 static struct clk *cpuclk;
 
@@ -82,14 +77,13 @@ static int sh_cpufreq_target(struct cpufreq_policy *policy,
 
 static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
 {
-       printk(KERN_INFO "cpufreq: SuperH CPU frequency driver.\n");
-
        if (!cpu_online(policy->cpu))
                return -ENODEV;
 
        cpuclk = clk_get(NULL, "cpu_clk");
        if (IS_ERR(cpuclk)) {
-               printk(KERN_ERR "cpufreq: couldn't get CPU clk\n");
+               printk(KERN_ERR "cpufreq: couldn't get CPU#%d clk\n",
+                      policy->cpu);
                return PTR_ERR(cpuclk);
        }
 
@@ -98,27 +92,25 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
        policy->cpuinfo.max_freq = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
        policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
 
-       policy->governor        = CPUFREQ_DEFAULT_GOVERNOR;
        policy->cur             = sh_cpufreq_get(policy->cpu);
        policy->min             = policy->cpuinfo.min_freq;
        policy->max             = policy->cpuinfo.max_freq;
 
-
        /*
         * Catch the cases where the clock framework hasn't been wired up
         * properly to support scaling.
         */
        if (unlikely(policy->min == policy->max)) {
                printk(KERN_ERR "cpufreq: clock framework rate rounding "
-                      "not supported on this CPU.\n");
+                      "not supported on CPU#%d.\n", policy->cpu);
 
                clk_put(cpuclk);
                return -EINVAL;
        }
 
-       printk(KERN_INFO "cpufreq: Frequencies - Minimum %u.%03u MHz, "
+       printk(KERN_INFO "cpufreq: CPU#%d Frequencies - Minimum %u.%03u MHz, "
               "Maximum %u.%03u MHz.\n",
-              policy->min / 1000, policy->min % 1000,
+              policy->cpu, policy->min / 1000, policy->min % 1000,
               policy->max / 1000, policy->max % 1000);
 
        return 0;
@@ -149,6 +141,7 @@ static struct cpufreq_driver sh_cpufreq_driver = {
 
 static int __init sh_cpufreq_module_init(void)
 {
+       printk(KERN_INFO "cpufreq: SuperH CPU frequency driver.\n");
        return cpufreq_register_driver(&sh_cpufreq_driver);
 }