1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#include <config.h>
22#include <version.h>
23#include <asm/arch/imx-regs.h>
24
25.globl lowlevel_init
26lowlevel_init:
27
28 mov r10, lr
29
30
31 ldr r0, =PCDR
32 ldr r1, =CONFIG_SYS_PCDR_VAL
33 str r1, [r0]
34
35
36
37 ldr r0, =MPCTL0
38 ldr r1, =CONFIG_SYS_MPCTL0_VAL
39 str r1, [r0]
40
41
42 ldr r0, =CSCR
43 ldr r1, [r0]
44 orr r1,r1,
45 str r1, [r0]
46
47 mov r2,
481:
49 mov r3,
502:
51 subs r3,r3,
52 bne 2b
53
54 subs r2,r2,
55 bne 1b
56
57
58
59 ldr r0, =SPCTL0
60 ldr r1, =CONFIG_SYS_SPCTL0_VAL
61 str r1, [r0]
62
63
64 ldr r0, =CSCR
65 ldr r1, [r0]
66 orr r1,r1,
67 str r1, [r0]
68
69 mov r2,
701:
71 mov r3,
722:
73 subs r3,r3,
74 bne 2b
75
76 subs r2,r2,
77 bne 1b
78
79 ldr r0, =CSCR
80 ldr r1, =CONFIG_SYS_CSCR_VAL
81 str r1, [r0]
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100 MRC p15,0,r0,c1,c0,0
101 ORR r0,r0,
102 MCR p15,0,r0,c1,c0,0
103
104 ldr r0, =GPR(0)
105 ldr r1, =CONFIG_SYS_GPR_A_VAL
106 str r1, [r0]
107
108 ldr r0, =GIUS(0)
109 ldr r1, =CONFIG_SYS_GIUS_A_VAL
110 str r1, [r0]
111
112
113
114 ldr r0, =FMCR
115 ldr r1, =CONFIG_SYS_FMCR_VAL
116 str r1, [r0]
117
118 ldr r0, =CS0U
119 ldr r1, =CONFIG_SYS_CS0U_VAL
120 str r1, [r0]
121
122 ldr r0, =CS0L
123 ldr r1, =CONFIG_SYS_CS0L_VAL
124 str r1, [r0]
125
126 ldr r0, =CS1U
127 ldr r1, =CONFIG_SYS_CS1U_VAL
128 str r1, [r0]
129
130 ldr r0, =CS1L
131 ldr r1, =CONFIG_SYS_CS1L_VAL
132 str r1, [r0]
133
134 ldr r0, =CS2U
135 ldr r1, =CONFIG_SYS_CS2U_VAL
136 str r1, [r0]
137
138 ldr r0, =CS2L
139 ldr r1, =CONFIG_SYS_CS2L_VAL
140 str r1, [r0]
141
142 ldr r0, =CS3U
143 ldr r1, =CONFIG_SYS_CS3U_VAL
144 str r1, [r0]
145
146 ldr r0, =CS3L
147 ldr r1, =CONFIG_SYS_CS3L_VAL
148 str r1, [r0]
149
150 ldr r0, =CS4U
151 ldr r1, =CONFIG_SYS_CS4U_VAL
152 str r1, [r0]
153
154 ldr r0, =CS4L
155 ldr r1, =CONFIG_SYS_CS4L_VAL
156 str r1, [r0]
157
158 ldr r0, =CS5U
159 ldr r1, =CONFIG_SYS_CS5U_VAL
160 str r1, [r0]
161
162 ldr r0, =CS5L
163 ldr r1, =CONFIG_SYS_CS5L_VAL
164 str r1, [r0]
165
166
167
168 ldr r0, =SDCTL0
169 ldr r1, =PRECHARGE_CMD
170 str r1, [r0]
171
172 ldr r0, =0x08200000
173 ldr r1, =0x0
174 str r1, [r0]
175
176 ldr r0, =SDCTL0
177 ldr r1, =AUTOREFRESH_CMD
178 str r1, [r0]
179
180 ldr r0, =0x08000000
181 ldr r1, =0x0
182 str r1, [r0]
183 str r1, [r0]
184 str r1, [r0]
185 str r1, [r0]
186 str r1, [r0]
187 str r1, [r0]
188 str r1, [r0]
189 str r1, [r0]
190
191 ldr r0, =SDCTL0
192 ldr r1, =0xb10a8300
193 str r1, [r0]
194
195 ldr r0, =0x08223000
196 ldr r1, =0x0
197 str r1, [r0]
198
199 ldr r0, =SDCTL0
200 ldr r1, =0x810a8200
201 str r1, [r0]
202
203 mov pc,r10
204