diff options
Diffstat (limited to 'arch/arm/mach-vexpress/tc2_pm.c')
-rw-r--r-- | arch/arm/mach-vexpress/tc2_pm.c | 48 |
1 files changed, 2 insertions, 46 deletions
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c index e6eb48192912..4eb92ebfd953 100644 --- a/arch/arm/mach-vexpress/tc2_pm.c +++ b/arch/arm/mach-vexpress/tc2_pm.c | |||
@@ -156,32 +156,7 @@ static void tc2_pm_down(u64 residency) | |||
156 | : : "r" (0x400) ); | 156 | : : "r" (0x400) ); |
157 | } | 157 | } |
158 | 158 | ||
159 | /* | 159 | v7_exit_coherency_flush(all); |
160 | * We need to disable and flush the whole (L1 and L2) cache. | ||
161 | * Let's do it in the safest possible way i.e. with | ||
162 | * no memory access within the following sequence | ||
163 | * including the stack. | ||
164 | * | ||
165 | * Note: fp is preserved to the stack explicitly prior doing | ||
166 | * this since adding it to the clobber list is incompatible | ||
167 | * with having CONFIG_FRAME_POINTER=y. | ||
168 | */ | ||
169 | asm volatile( | ||
170 | "str fp, [sp, #-4]! \n\t" | ||
171 | "mrc p15, 0, r0, c1, c0, 0 @ get CR \n\t" | ||
172 | "bic r0, r0, #"__stringify(CR_C)" \n\t" | ||
173 | "mcr p15, 0, r0, c1, c0, 0 @ set CR \n\t" | ||
174 | "isb \n\t" | ||
175 | "bl v7_flush_dcache_all \n\t" | ||
176 | "clrex \n\t" | ||
177 | "mrc p15, 0, r0, c1, c0, 1 @ get AUXCR \n\t" | ||
178 | "bic r0, r0, #(1 << 6) @ disable local coherency \n\t" | ||
179 | "mcr p15, 0, r0, c1, c0, 1 @ set AUXCR \n\t" | ||
180 | "isb \n\t" | ||
181 | "dsb \n\t" | ||
182 | "ldr fp, [sp], #4" | ||
183 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", | ||
184 | "r9","r10","lr","memory"); | ||
185 | 160 | ||
186 | cci_disable_port_by_cpu(mpidr); | 161 | cci_disable_port_by_cpu(mpidr); |
187 | 162 | ||
@@ -197,26 +172,7 @@ static void tc2_pm_down(u64 residency) | |||
197 | 172 | ||
198 | arch_spin_unlock(&tc2_pm_lock); | 173 | arch_spin_unlock(&tc2_pm_lock); |
199 | 174 | ||
200 | /* | 175 | v7_exit_coherency_flush(louis); |
201 | * We need to disable and flush only the L1 cache. | ||
202 | * Let's do it in the safest possible way as above. | ||
203 | */ | ||
204 | asm volatile( | ||
205 | "str fp, [sp, #-4]! \n\t" | ||
206 | "mrc p15, 0, r0, c1, c0, 0 @ get CR \n\t" | ||
207 | "bic r0, r0, #"__stringify(CR_C)" \n\t" | ||
208 | "mcr p15, 0, r0, c1, c0, 0 @ set CR \n\t" | ||
209 | "isb \n\t" | ||
210 | "bl v7_flush_dcache_louis \n\t" | ||
211 | "clrex \n\t" | ||
212 | "mrc p15, 0, r0, c1, c0, 1 @ get AUXCR \n\t" | ||
213 | "bic r0, r0, #(1 << 6) @ disable local coherency \n\t" | ||
214 | "mcr p15, 0, r0, c1, c0, 1 @ set AUXCR \n\t" | ||
215 | "isb \n\t" | ||
216 | "dsb \n\t" | ||
217 | "ldr fp, [sp], #4" | ||
218 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", | ||
219 | "r9","r10","lr","memory"); | ||
220 | } | 176 | } |
221 | 177 | ||
222 | __mcpm_cpu_down(cpu, cluster); | 178 | __mcpm_cpu_down(cpu, cluster); |