aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common/head.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-common/head.S')
-rw-r--r--arch/blackfin/mach-common/head.S52
1 files changed, 48 insertions, 4 deletions
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S
index 191b4e974c4b..3069df580729 100644
--- a/arch/blackfin/mach-common/head.S
+++ b/arch/blackfin/mach-common/head.S
@@ -68,6 +68,16 @@ ENTRY(__start)
68 M2 = r0; 68 M2 = r0;
69 M3 = r0; 69 M3 = r0;
70 70
71 /*
72 * Clear ITEST_COMMAND and DTEST_COMMAND registers,
73 * Leaving these as non-zero can confuse the emulator
74 */
75 p0.L = LO(DTEST_COMMAND);
76 p0.H = HI(DTEST_COMMAND);
77 [p0] = R0;
78 [p0 + (ITEST_COMMAND - DTEST_COMMAND)] = R0;
79 CSYNC;
80
71 trace_buffer_init(p0,r0); 81 trace_buffer_init(p0,r0);
72 P0 = R1; 82 P0 = R1;
73 R0 = R1; 83 R0 = R1;
@@ -90,12 +100,46 @@ ENTRY(__start)
90 [p0] = R0; 100 [p0] = R0;
91 SSYNC; 101 SSYNC;
92 102
93 /* Save RETX, in case of doublefault */ 103 /* in case of double faults, save a few things */
94 p0.l = ___retx; 104 p0.l = _init_retx;
95 p0.h = ___retx; 105 p0.h = _init_retx;
96 R0 = RETX; 106 R0 = RETX;
97 [P0] = R0; 107 [P0] = R0;
98 108
109#ifdef CONFIG_DEBUG_DOUBLEFAULT
110 /* Only save these if we are storing them,
111 * This happens here, since L1 gets clobbered
112 * below
113 */
114 p0.l = _saved_retx;
115 p0.h = _saved_retx;
116 p1.l = _init_saved_retx;
117 p1.h = _init_saved_retx;
118 r0 = [p0];
119 [p1] = r0;
120
121 p0.l = _saved_dcplb_fault_addr;
122 p0.h = _saved_dcplb_fault_addr;
123 p1.l = _init_saved_dcplb_fault_addr;
124 p1.h = _init_saved_dcplb_fault_addr;
125 r0 = [p0];
126 [p1] = r0;
127
128 p0.l = _saved_icplb_fault_addr;
129 p0.h = _saved_icplb_fault_addr;
130 p1.l = _init_saved_icplb_fault_addr;
131 p1.h = _init_saved_icplb_fault_addr;
132 r0 = [p0];
133 [p1] = r0;
134
135 p0.l = _saved_seqstat;
136 p0.h = _saved_seqstat;
137 p1.l = _init_saved_seqstat;
138 p1.h = _init_saved_seqstat;
139 r0 = [p0];
140 [p1] = r0;
141#endif
142
99 /* Initialize stack pointer */ 143 /* Initialize stack pointer */
100 sp.l = lo(INITIAL_STACK); 144 sp.l = lo(INITIAL_STACK);
101 sp.h = hi(INITIAL_STACK); 145 sp.h = hi(INITIAL_STACK);
@@ -107,7 +151,7 @@ ENTRY(__start)
107#endif 151#endif
108 152
109 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ 153 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
110 call _bf53x_relocate_l1_mem; 154 call _bfin_relocate_l1_mem;
111#ifdef CONFIG_BFIN_KERNEL_CLOCK 155#ifdef CONFIG_BFIN_KERNEL_CLOCK
112 call _start_dma_code; 156 call _start_dma_code;
113#endif 157#endif