blob: 5b39484501c1d8805931c42c1fa9f93bda40e7f6 [file] [log] [blame]
Sergey Kubushyne8f39122007-08-10 20:26:18 +02001/*
2 * Low-level board setup code for TI DaVinci SoC based boards.
3 *
4 * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
5 *
6 * Partially based on TI sources, original copyrights follow:
7 */
8
9/*
10 * Board specific setup info
11 *
12 * (C) Copyright 2003
13 * Texas Instruments, <www.ti.com>
14 * Kshitij Gupta <Kshitij@ti.com>
15 *
16 * Modified for OMAP 1610 H2 board by Nishant Kamat, Jan 2004
17 *
18 * Modified for OMAP 5912 OSK board by Rishi Bhattacharya, Apr 2004
19 * See file CREDITS for list of people who contributed to this
20 * project.
21 *
22 * Modified for DV-EVM board by Rishi Bhattacharya, Apr 2005
23 * See file CREDITS for list of people who contributed to this
24 * project.
25 *
26 * Modified for DV-EVM board by Swaminathan S, Nov 2005
27 * See file CREDITS for list of people who contributed to this
28 * project.
29 *
30 * This program is free software; you can redistribute it and/or
31 * modify it under the terms of the GNU General Public License as
32 * published by the Free Software Foundation; either version 2 of
33 * the License, or (at your option) any later version.
34 *
35 * This program is distributed in the hope that it will be useful,
36 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 * GNU General Public License for more details.
39 *
40 * You should have received a copy of the GNU General Public License
41 * along with this program; if not, write to the Free Software
42 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
43 * MA 02111-1307 USA
44 */
45
46#include <config.h>
47
Sergei Shtylyov617ee0b2011-09-23 04:29:15 +000048#define MDSTAT_STATE 0x3f
49
Sergey Kubushyne8f39122007-08-10 20:26:18 +020050.globl lowlevel_init
51lowlevel_init:
Christian Riesch750fdd02012-02-02 00:44:36 +000052#ifdef CONFIG_SOC_DM644X
Sergey Kubushyne8f39122007-08-10 20:26:18 +020053
54 /*-------------------------------------------------------*
55 * Mask all IRQs by setting all bits in the EINT default *
56 *-------------------------------------------------------*/
57 mov r1, $0
58 ldr r0, =EINT_ENABLE0
59 str r1, [r0]
60 ldr r0, =EINT_ENABLE1
61 str r1, [r0]
62
63 /*------------------------------------------------------*
64 * Put the GEM in reset *
65 *------------------------------------------------------*/
66
67 /* Put the GEM in reset */
68 ldr r8, PSC_GEM_FLAG_CLEAR
69 ldr r6, MDCTL_GEM
70 ldr r7, [r6]
71 and r7, r7, r8
72 str r7, [r6]
73
74 /* Enable the Power Domain Transition Command */
75 ldr r6, PTCMD
76 ldr r7, [r6]
77 orr r7, r7, $0x02
78 str r7, [r6]
79
80 /* Check for Transition Complete(PTSTAT) */
81checkStatClkStopGem:
82 ldr r6, PTSTAT
83 ldr r7, [r6]
84 ands r7, r7, $0x02
85 bne checkStatClkStopGem
86
87 /* Check for GEM Reset Completion */
88checkGemStatClkStop:
89 ldr r6, MDSTAT_GEM
90 ldr r7, [r6]
91 ands r7, r7, $0x100
92 bne checkGemStatClkStop
93
94 /* Do this for enabling a WDT initiated reset this is a workaround
95 for a chip bug. Not required under normal situations */
96 ldr r6, P1394
97 mov r10, $0
98 str r10, [r6]
99
100 /*------------------------------------------------------*
101 * Enable L1 & L2 Memories in Fast mode *
102 *------------------------------------------------------*/
103 ldr r6, DFT_ENABLE
104 mov r10, $0x01
105 str r10, [r6]
106
107 ldr r6, MMARG_BRF0
108 ldr r10, MMARG_BRF0_VAL
109 str r10, [r6]
110
111 ldr r6, DFT_ENABLE
112 mov r10, $0
113 str r10, [r6]
114
115 /*------------------------------------------------------*
Wolfgang Denka1be4762008-05-20 16:00:29 +0200116 * DDR2 PLL Initialization *
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200117 *------------------------------------------------------*/
118
119 /* Select the Clock Mode Depending on the Value written in the Boot Table by the run script */
120 mov r10, $0
121 ldr r6, PLL2_CTL
122 ldr r7, PLL_CLKSRC_MASK
123 ldr r8, [r6]
124 and r8, r8, r7
125 mov r9, r10, lsl $8
126 orr r8, r8, r9
127 str r8, [r6]
128
129 /* Select the PLLEN source */
130 ldr r7, PLL_ENSRC_MASK
131 and r8, r8, r7
132 str r8, [r6]
133
134 /* Bypass the PLL */
135 ldr r7, PLL_BYPASS_MASK
136 and r8, r8, r7
137 str r8, [r6]
138
139 /* Wait for few cycles to allow PLLEN Mux switch properly to bypass Clock */
140 mov r10, $0x20
141WaitPPL2Loop:
142 subs r10, r10, $1
143 bne WaitPPL2Loop
144
145 /* Reset the PLL */
146 ldr r7, PLL_RESET_MASK
147 and r8, r8, r7
148 str r8, [r6]
149
150 /* Power up the PLL */
151 ldr r7, PLL_PWRUP_MASK
152 and r8, r8, r7
153 str r8, [r6]
154
155 /* Enable the PLL from Disable Mode */
156 ldr r7, PLL_DISABLE_ENABLE_MASK
157 and r8, r8, r7
158 str r8, [r6]
159
160 /* Program the PLL Multiplier */
161 ldr r6, PLL2_PLLM
Wolfgang Denka48499f2008-04-11 15:11:26 +0200162 mov r2, $0x17 /* 162 MHz */
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200163 str r2, [r6]
164
165 /* Program the PLL2 Divisor Value */
166 ldr r6, PLL2_DIV2
Wolfgang Denka48499f2008-04-11 15:11:26 +0200167 mov r3, $0x01
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200168 str r3, [r6]
169
170 /* Program the PLL2 Divisor Value */
171 ldr r6, PLL2_DIV1
Wolfgang Denka48499f2008-04-11 15:11:26 +0200172 mov r4, $0x0b /* 54 MHz */
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200173 str r4, [r6]
174
175 /* PLL2 DIV2 MMR */
176 ldr r8, PLL2_DIV_MASK
177 ldr r6, PLL2_DIV2
178 ldr r9, [r6]
179 and r8, r8, r9
180 mov r9, $0x01
181 mov r9, r9, lsl $15
182 orr r8, r8, r9
183 str r8, [r6]
184
185 /* Program the GOSET bit to take new divider values */
186 ldr r6, PLL2_PLLCMD
187 ldr r7, [r6]
188 orr r7, r7, $0x01
189 str r7, [r6]
190
191 /* Wait for Done */
192 ldr r6, PLL2_PLLSTAT
193doneLoop_0:
194 ldr r7, [r6]
195 ands r7, r7, $0x01
196 bne doneLoop_0
197
198 /* PLL2 DIV1 MMR */
199 ldr r8, PLL2_DIV_MASK
200 ldr r6, PLL2_DIV1
201 ldr r9, [r6]
202 and r8, r8, r9
203 mov r9, $0x01
204 mov r9, r9, lsl $15
205 orr r8, r8, r9
206 str r8, [r6]
207
208 /* Program the GOSET bit to take new divider values */
209 ldr r6, PLL2_PLLCMD
210 ldr r7, [r6]
211 orr r7, r7, $0x01
212 str r7, [r6]
213
214 /* Wait for Done */
215 ldr r6, PLL2_PLLSTAT
216doneLoop:
217 ldr r7, [r6]
218 ands r7, r7, $0x01
219 bne doneLoop
220
221 /* Wait for PLL to Reset Properly */
222 mov r10, $0x218
223ResetPPL2Loop:
224 subs r10, r10, $1
225 bne ResetPPL2Loop
226
227 /* Bring PLL out of Reset */
228 ldr r6, PLL2_CTL
229 ldr r8, [r6]
230 orr r8, r8, $0x08
231 str r8, [r6]
232
233 /* Wait for PLL to Lock */
234 ldr r10, PLL_LOCK_COUNT
235PLL2Lock:
236 subs r10, r10, $1
237 bne PLL2Lock
238
239 /* Enable the PLL */
240 ldr r6, PLL2_CTL
241 ldr r8, [r6]
242 orr r8, r8, $0x01
243 str r8, [r6]
244
245 /*------------------------------------------------------*
246 * Issue Soft Reset to DDR Module *
247 *------------------------------------------------------*/
248
249 /* Shut down the DDR2 LPSC Module */
250 ldr r8, PSC_FLAG_CLEAR
251 ldr r6, MDCTL_DDR2
252 ldr r7, [r6]
253 and r7, r7, r8
254 orr r7, r7, $0x03
255 str r7, [r6]
256
257 /* Enable the Power Domain Transition Command */
258 ldr r6, PTCMD
259 ldr r7, [r6]
260 orr r7, r7, $0x01
261 str r7, [r6]
262
263 /* Check for Transition Complete(PTSTAT) */
264checkStatClkStop:
265 ldr r6, PTSTAT
266 ldr r7, [r6]
267 ands r7, r7, $0x01
268 bne checkStatClkStop
269
270 /* Check for DDR2 Controller Enable Completion */
271checkDDRStatClkStop:
272 ldr r6, MDSTAT_DDR2
273 ldr r7, [r6]
Sergei Shtylyov617ee0b2011-09-23 04:29:15 +0000274 and r7, r7, $MDSTAT_STATE
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200275 cmp r7, $0x03
276 bne checkDDRStatClkStop
277
278 /*------------------------------------------------------*
Wolfgang Denka48499f2008-04-11 15:11:26 +0200279 * Program DDR2 MMRs for 162MHz Setting *
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200280 *------------------------------------------------------*/
281
282 /* Program PHY Control Register */
283 ldr r6, DDRCTL
284 ldr r7, DDRCTL_VAL
285 str r7, [r6]
286
287 /* Program SDRAM Bank Config Register */
288 ldr r6, SDCFG
289 ldr r7, SDCFG_VAL
290 str r7, [r6]
291
292 /* Program SDRAM TIM-0 Config Register */
293 ldr r6, SDTIM0
Wolfgang Denka48499f2008-04-11 15:11:26 +0200294 ldr r7, SDTIM0_VAL_162MHz
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200295 str r7, [r6]
296
297 /* Program SDRAM TIM-1 Config Register */
298 ldr r6, SDTIM1
Wolfgang Denka48499f2008-04-11 15:11:26 +0200299 ldr r7, SDTIM1_VAL_162MHz
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200300 str r7, [r6]
301
302 /* Program the SDRAM Bank Config Control Register */
303 ldr r10, MASK_VAL
304 ldr r8, SDCFG
305 ldr r9, SDCFG_VAL
306 and r9, r9, r10
307 str r9, [r8]
308
309 /* Program SDRAM SDREF Config Register */
310 ldr r6, SDREF
311 ldr r7, SDREF_VAL
312 str r7, [r6]
313
314 /*------------------------------------------------------*
315 * Issue Soft Reset to DDR Module *
316 *------------------------------------------------------*/
317
318 /* Issue a Dummy DDR2 read/write */
319 ldr r8, DDR2_START_ADDR
320 ldr r7, DUMMY_VAL
321 str r7, [r8]
322 ldr r7, [r8]
323
324 /* Shut down the DDR2 LPSC Module */
325 ldr r8, PSC_FLAG_CLEAR
326 ldr r6, MDCTL_DDR2
327 ldr r7, [r6]
328 and r7, r7, r8
329 orr r7, r7, $0x01
330 str r7, [r6]
331
332 /* Enable the Power Domain Transition Command */
333 ldr r6, PTCMD
334 ldr r7, [r6]
335 orr r7, r7, $0x01
336 str r7, [r6]
337
338 /* Check for Transition Complete(PTSTAT) */
339checkStatClkStop2:
340 ldr r6, PTSTAT
341 ldr r7, [r6]
342 ands r7, r7, $0x01
343 bne checkStatClkStop2
344
345 /* Check for DDR2 Controller Enable Completion */
346checkDDRStatClkStop2:
347 ldr r6, MDSTAT_DDR2
348 ldr r7, [r6]
Sergei Shtylyov617ee0b2011-09-23 04:29:15 +0000349 and r7, r7, $MDSTAT_STATE
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200350 cmp r7, $0x01
351 bne checkDDRStatClkStop2
352
353 /*------------------------------------------------------*
354 * Turn DDR2 Controller Clocks On *
355 *------------------------------------------------------*/
356
357 /* Enable the DDR2 LPSC Module */
358 ldr r6, MDCTL_DDR2
359 ldr r7, [r6]
360 orr r7, r7, $0x03
361 str r7, [r6]
362
363 /* Enable the Power Domain Transition Command */
364 ldr r6, PTCMD
365 ldr r7, [r6]
366 orr r7, r7, $0x01
367 str r7, [r6]
368
369 /* Check for Transition Complete(PTSTAT) */
370checkStatClkEn2:
371 ldr r6, PTSTAT
372 ldr r7, [r6]
373 ands r7, r7, $0x01
374 bne checkStatClkEn2
375
376 /* Check for DDR2 Controller Enable Completion */
377checkDDRStatClkEn2:
378 ldr r6, MDSTAT_DDR2
379 ldr r7, [r6]
Sergei Shtylyov617ee0b2011-09-23 04:29:15 +0000380 and r7, r7, $MDSTAT_STATE
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200381 cmp r7, $0x03
382 bne checkDDRStatClkEn2
383
384 /* DDR Writes and Reads */
385 ldr r6, CFGTEST
386 mov r3, $0x01
387 str r3, [r6]
388
389 /*------------------------------------------------------*
390 * System PLL Initialization *
391 *------------------------------------------------------*/
392
393 /* Select the Clock Mode Depending on the Value written in the Boot Table by the run script */
394 mov r2, $0
395 ldr r6, PLL1_CTL
396 ldr r7, PLL_CLKSRC_MASK
397 ldr r8, [r6]
398 and r8, r8, r7
399 mov r9, r2, lsl $8
400 orr r8, r8, r9
401 str r8, [r6]
402
403 /* Select the PLLEN source */
404 ldr r7, PLL_ENSRC_MASK
405 and r8, r8, r7
406 str r8, [r6]
407
408 /* Bypass the PLL */
409 ldr r7, PLL_BYPASS_MASK
410 and r8, r8, r7
411 str r8, [r6]
412
413 /* Wait for few cycles to allow PLLEN Mux switch properly to bypass Clock */
414 mov r10, $0x20
415
416WaitLoop:
417 subs r10, r10, $1
418 bne WaitLoop
419
420 /* Reset the PLL */
421 ldr r7, PLL_RESET_MASK
422 and r8, r8, r7
423 str r8, [r6]
424
425 /* Disable the PLL */
426 orr r8, r8, $0x10
427 str r8, [r6]
428
429 /* Power up the PLL */
430 ldr r7, PLL_PWRUP_MASK
431 and r8, r8, r7
432 str r8, [r6]
433
434 /* Enable the PLL from Disable Mode */
435 ldr r7, PLL_DISABLE_ENABLE_MASK
436 and r8, r8, r7
437 str r8, [r6]
438
439 /* Program the PLL Multiplier */
440 ldr r6, PLL1_PLLM
Wolfgang Denka48499f2008-04-11 15:11:26 +0200441 mov r3, $0x15 /* For 594MHz */
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200442 str r3, [r6]
443
444 /* Wait for PLL to Reset Properly */
445 mov r10, $0xff
446
447ResetLoop:
448 subs r10, r10, $1
449 bne ResetLoop
450
451 /* Bring PLL out of Reset */
452 ldr r6, PLL1_CTL
453 orr r8, r8, $0x08
454 str r8, [r6]
455
456 /* Wait for PLL to Lock */
457 ldr r10, PLL_LOCK_COUNT
458
459PLL1Lock:
460 subs r10, r10, $1
461 bne PLL1Lock
462
463 /* Enable the PLL */
464 orr r8, r8, $0x01
465 str r8, [r6]
466
467 nop
468 nop
469 nop
470 nop
471
472 /*------------------------------------------------------*
Wolfgang Denka48499f2008-04-11 15:11:26 +0200473 * AEMIF configuration for NOR Flash (double check) *
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200474 *------------------------------------------------------*/
475 ldr r0, _PINMUX0
476 ldr r1, _DEV_SETTING
477 str r1, [r0]
478
479 ldr r0, WAITCFG
480 ldr r1, WAITCFG_VAL
481 ldr r2, [r0]
482 orr r2, r2, r1
483 str r2, [r0]
484
485 ldr r0, ACFG3
486 ldr r1, ACFG3_VAL
487 ldr r2, [r0]
488 and r1, r2, r1
489 str r1, [r0]
490
491 ldr r0, ACFG4
492 ldr r1, ACFG4_VAL
493 ldr r2, [r0]
494 and r1, r2, r1
495 str r1, [r0]
496
497 ldr r0, ACFG5
498 ldr r1, ACFG5_VAL
499 ldr r2, [r0]
500 and r1, r2, r1
501 str r1, [r0]
502
503 /*--------------------------------------*
504 * VTP manual Calibration *
505 *--------------------------------------*/
506 ldr r0, VTPIOCR
507 ldr r1, VTP_MMR0
508 str r1, [r0]
509
510 ldr r0, VTPIOCR
511 ldr r1, VTP_MMR1
512 str r1, [r0]
513
514 /* Wait for 33 VTP CLK cycles. VRP operates at 27 MHz */
515 ldr r10, VTP_LOCK_COUNT
516VTPLock:
517 subs r10, r10, $1
518 bne VTPLock
519
520 ldr r6, DFT_ENABLE
521 mov r10, $0x01
522 str r10, [r6]
523
524 ldr r6, DDRVTPR
525 ldr r7, [r6]
526 and r7, r7, $0x1f
527 and r8, r7, $0x3e0
528 orr r8, r7, r8
529 ldr r7, VTP_RECAL
530 orr r8, r7, r8
531 ldr r7, VTP_EN
532 orr r8, r7, r8
533 str r8, [r0]
534
535
536 /* Wait for 33 VTP CLK cycles. VRP operates at 27 MHz */
537 ldr r10, VTP_LOCK_COUNT
538VTP1Lock:
539 subs r10, r10, $1
540 bne VTP1Lock
541
542 ldr r1, [r0]
543 ldr r2, VTP_MASK
544 and r2, r1, r2
545 str r2, [r0]
546
547 ldr r6, DFT_ENABLE
548 mov r10, $0
549 str r10, [r6]
550
Stefan Roese86ec9122007-08-10 20:34:58 +0200551 /*
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200552 * Call board-specific lowlevel init.
Wolfgang Denka1be4762008-05-20 16:00:29 +0200553 * That MUST be present and THAT returns
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200554 * back to arch calling code with "mov pc, lr."
555 */
556 b dv_board_init
557
558.ltorg
559
560_PINMUX0:
561 .word 0x01c40000 /* Device Configuration Registers */
562_PINMUX1:
563 .word 0x01c40004 /* Device Configuration Registers */
564
565_DEV_SETTING:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200566 .word 0x00000c1f
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200567
568WAITCFG:
569 .word 0x01e00004
570WAITCFG_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200571 .word 0
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200572ACFG3:
573 .word 0x01e00014
574ACFG3_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200575 .word 0x3ffffffd
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200576ACFG4:
577 .word 0x01e00018
578ACFG4_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200579 .word 0x3ffffffd
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200580ACFG5:
581 .word 0x01e0001c
582ACFG5_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200583 .word 0x3ffffffd
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200584
585MDCTL_DDR2:
586 .word 0x01c41a34
587MDSTAT_DDR2:
588 .word 0x01c41834
589
590PTCMD:
591 .word 0x01c41120
592PTSTAT:
593 .word 0x01c41128
594
595EINT_ENABLE0:
596 .word 0x01c48018
597EINT_ENABLE1:
598 .word 0x01c4801c
599
600PSC_FLAG_CLEAR:
601 .word 0xffffffe0
602PSC_GEM_FLAG_CLEAR:
603 .word 0xfffffeff
604
Wolfgang Denka48499f2008-04-11 15:11:26 +0200605/* DDR2 MMR & CONFIGURATION VALUES, 162 MHZ clock */
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200606DDRCTL:
607 .word 0x200000e4
608DDRCTL_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200609 .word 0x50006405
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200610SDREF:
611 .word 0x2000000c
612SDREF_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200613 .word 0x000005c3
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200614SDCFG:
615 .word 0x20000008
616SDCFG_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200617#ifdef DDR_4BANKS
618 .word 0x00178622
619#elif defined DDR_8BANKS
620 .word 0x00178632
621#else
622#error "Unknown DDR configuration!!!"
623#endif
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200624SDTIM0:
625 .word 0x20000010
Wolfgang Denka48499f2008-04-11 15:11:26 +0200626SDTIM0_VAL_162MHz:
627 .word 0x28923211
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200628SDTIM1:
629 .word 0x20000014
Wolfgang Denka48499f2008-04-11 15:11:26 +0200630SDTIM1_VAL_162MHz:
631 .word 0x0016c722
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200632VTPIOCR:
633 .word 0x200000f0 /* VTP IO Control register */
634DDRVTPR:
635 .word 0x01c42030 /* DDR VPTR MMR */
636VTP_MMR0:
637 .word 0x201f
638VTP_MMR1:
639 .word 0xa01f
640DFT_ENABLE:
641 .word 0x01c4004c
642VTP_LOCK_COUNT:
643 .word 0x5b0
644VTP_MASK:
645 .word 0xffffdfff
646VTP_RECAL:
647 .word 0x40000
648VTP_EN:
649 .word 0x02000
650CFGTEST:
651 .word 0x80010000
652MASK_VAL:
653 .word 0x00000fff
654
655/* GEM Power Up & LPSC Control Register */
656MDCTL_GEM:
657 .word 0x01c41a9c
658MDSTAT_GEM:
659 .word 0x01c4189c
660
661/* For WDT reset chip bug */
662P1394:
663 .word 0x01c41a20
664
665PLL_CLKSRC_MASK:
666 .word 0xfffffeff /* Mask the Clock Mode bit */
667PLL_ENSRC_MASK:
668 .word 0xffffffdf /* Select the PLLEN source */
669PLL_BYPASS_MASK:
670 .word 0xfffffffe /* Put the PLL in BYPASS */
671PLL_RESET_MASK:
672 .word 0xfffffff7 /* Put the PLL in Reset Mode */
673PLL_PWRUP_MASK:
674 .word 0xfffffffd /* PLL Power up Mask Bit */
675PLL_DISABLE_ENABLE_MASK:
676 .word 0xffffffef /* Enable the PLL from Disable */
677PLL_LOCK_COUNT:
678 .word 0x2000
679
680/* PLL1-SYSTEM PLL MMRs */
681PLL1_CTL:
682 .word 0x01c40900
683PLL1_PLLM:
684 .word 0x01c40910
685
686/* PLL2-SYSTEM PLL MMRs */
687PLL2_CTL:
688 .word 0x01c40d00
689PLL2_PLLM:
690 .word 0x01c40d10
691PLL2_DIV1:
692 .word 0x01c40d18
693PLL2_DIV2:
694 .word 0x01c40d1c
695PLL2_PLLCMD:
696 .word 0x01c40d38
697PLL2_PLLSTAT:
698 .word 0x01c40d3c
699PLL2_DIV_MASK:
700 .word 0xffff7fff
701
702MMARG_BRF0:
703 .word 0x01c42010 /* BRF margin mode 0 (R/W)*/
704MMARG_BRF0_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200705 .word 0x00444400
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200706
707DDR2_START_ADDR:
708 .word 0x80000000
709DUMMY_VAL:
710 .word 0xa55aa55a
Christian Riesch750fdd02012-02-02 00:44:36 +0000711#else /* CONFIG_SOC_DM644X */
712 mov pc, lr
713#endif