aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common/entry.S
diff options
context:
space:
mode:
authorYi Li <yi.li@analog.com>2009-08-06 21:20:58 -0400
committerMike Frysinger <vapier@gentoo.org>2009-09-16 22:10:19 -0400
commiteb7bd9c461bbfbb195cb1e1346453222a4352df4 (patch)
tree9c92f6ce5160b655213bbcff8175878771594121 /arch/blackfin/mach-common/entry.S
parent8312440e05ea74feabc648ad8f36c823af4ddd8e (diff)
Blackfin: cleanup sync handling when enabling/disabling cplbs
The handling of updating the [DI]MEM_CONTROL MMRs does not follow proper sync procedures as laid out in the Blackfin programming manual. So rather than audit/fix every call location, create helper functions that do the right things in order to safely update these MMRs. Then convert all call sites to use these new helper functions. While we're fixing the code, drop the workaround for anomaly 05000125 as that anomaly applies to old versions of silicon that we do not support. Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-common/entry.S')
-rw-r--r--arch/blackfin/mach-common/entry.S14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index 4e8e3fe0ba1c..e7eb16355f74 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -397,8 +397,7 @@ ENTRY(_double_fault)
397 397
398 R5 = [P4]; /* Control Register*/ 398 R5 = [P4]; /* Control Register*/
399 BITCLR(R5,ENICPLB_P); 399 BITCLR(R5,ENICPLB_P);
400 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */ 400 CSYNC; /* Disabling of CPLBs should be proceeded by a CSYNC */
401 .align 8;
402 [P4] = R5; 401 [P4] = R5;
403 SSYNC; 402 SSYNC;
404 403
@@ -406,8 +405,7 @@ ENTRY(_double_fault)
406 P4.H = HI(DMEM_CONTROL); 405 P4.H = HI(DMEM_CONTROL);
407 R5 = [P4]; 406 R5 = [P4];
408 BITCLR(R5,ENDCPLB_P); 407 BITCLR(R5,ENDCPLB_P);
409 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */ 408 CSYNC; /* Disabling of CPLBs should be proceeded by a CSYNC */
410 .align 8;
411 [P4] = R5; 409 [P4] = R5;
412 SSYNC; 410 SSYNC;
413 411
@@ -1146,9 +1144,7 @@ ENTRY(_early_trap)
1146 1144
1147 R5 = [P4]; /* Control Register*/ 1145 R5 = [P4]; /* Control Register*/
1148 BITCLR(R5,ENICPLB_P); 1146 BITCLR(R5,ENICPLB_P);
1149 CLI R1; 1147 CSYNC; /* Disabling of CPLBs should be proceeded by a CSYNC */
1150 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
1151 .align 8;
1152 [P4] = R5; 1148 [P4] = R5;
1153 SSYNC; 1149 SSYNC;
1154 1150
@@ -1156,11 +1152,9 @@ ENTRY(_early_trap)
1156 P4.H = HI(DMEM_CONTROL); 1152 P4.H = HI(DMEM_CONTROL);
1157 R5 = [P4]; 1153 R5 = [P4];
1158 BITCLR(R5,ENDCPLB_P); 1154 BITCLR(R5,ENDCPLB_P);
1159 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */ 1155 CSYNC; /* Disabling of CPLBs should be proceeded by a CSYNC */
1160 .align 8;
1161 [P4] = R5; 1156 [P4] = R5;
1162 SSYNC; 1157 SSYNC;
1163 STI R1;
1164 1158
1165 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */ 1159 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
1166 r1 = RETX; 1160 r1 = RETX;