diff options
Diffstat (limited to 'arch/powerpc/platforms/pasemi/cpufreq.c')
-rw-r--r-- | arch/powerpc/platforms/pasemi/cpufreq.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c index 1cfb8b0c8fec..58556b028a4c 100644 --- a/arch/powerpc/platforms/pasemi/cpufreq.c +++ b/arch/powerpc/platforms/pasemi/cpufreq.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/io.h> | 32 | #include <asm/io.h> |
33 | #include <asm/prom.h> | 33 | #include <asm/prom.h> |
34 | #include <asm/time.h> | 34 | #include <asm/time.h> |
35 | #include <asm/smp.h> | ||
35 | 36 | ||
36 | #define SDCASR_REG 0x0100 | 37 | #define SDCASR_REG 0x0100 |
37 | #define SDCASR_REG_STRIDE 0x1000 | 38 | #define SDCASR_REG_STRIDE 0x1000 |
@@ -124,6 +125,11 @@ static void set_astate(int cpu, unsigned int astate) | |||
124 | local_irq_restore(flags); | 125 | local_irq_restore(flags); |
125 | } | 126 | } |
126 | 127 | ||
128 | int check_astate(void) | ||
129 | { | ||
130 | return get_cur_astate(hard_smp_processor_id()); | ||
131 | } | ||
132 | |||
127 | void restore_astate(int cpu) | 133 | void restore_astate(int cpu) |
128 | { | 134 | { |
129 | set_astate(cpu, current_astate); | 135 | set_astate(cpu, current_astate); |
@@ -147,7 +153,10 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
147 | if (!cpu) | 153 | if (!cpu) |
148 | goto out; | 154 | goto out; |
149 | 155 | ||
150 | dn = of_find_compatible_node(NULL, "sdc", "1682m-sdc"); | 156 | dn = of_find_compatible_node(NULL, NULL, "1682m-sdc"); |
157 | if (!dn) | ||
158 | dn = of_find_compatible_node(NULL, NULL, | ||
159 | "pasemi,pwrficient-sdc"); | ||
151 | if (!dn) | 160 | if (!dn) |
152 | goto out; | 161 | goto out; |
153 | err = of_address_to_resource(dn, 0, &res); | 162 | err = of_address_to_resource(dn, 0, &res); |
@@ -160,7 +169,10 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
160 | goto out; | 169 | goto out; |
161 | } | 170 | } |
162 | 171 | ||
163 | dn = of_find_compatible_node(NULL, "gizmo", "1682m-gizmo"); | 172 | dn = of_find_compatible_node(NULL, NULL, "1682m-gizmo"); |
173 | if (!dn) | ||
174 | dn = of_find_compatible_node(NULL, NULL, | ||
175 | "pasemi,pwrficient-gizmo"); | ||
164 | if (!dn) { | 176 | if (!dn) { |
165 | err = -ENODEV; | 177 | err = -ENODEV; |
166 | goto out_unmap_sdcasr; | 178 | goto out_unmap_sdcasr; |
@@ -292,7 +304,8 @@ static struct cpufreq_driver pas_cpufreq_driver = { | |||
292 | 304 | ||
293 | static int __init pas_cpufreq_init(void) | 305 | static int __init pas_cpufreq_init(void) |
294 | { | 306 | { |
295 | if (!machine_is_compatible("PA6T-1682M")) | 307 | if (!machine_is_compatible("PA6T-1682M") && |
308 | !machine_is_compatible("pasemi,pwrficient")) | ||
296 | return -ENODEV; | 309 | return -ENODEV; |
297 | 310 | ||
298 | return cpufreq_register_driver(&pas_cpufreq_driver); | 311 | return cpufreq_register_driver(&pas_cpufreq_driver); |