]> git.ipfire.org Git - people/ms/u-boot.git/blob - board/mx1ads/lowlevel_init.S
mini2440: remove board support
[people/ms/u-boot.git] / board / mx1ads / lowlevel_init.S
1 /*
2 * board/mx1ads/lowlevel_init.S
3 *
4 * (c) Copyright 2004
5 * Techware Information Technology, Inc.
6 * http://www.techware.com.tw/
7 *
8 * Ming-Len Wu <minglen_wu@techware.com.tw>
9 *
10 * SPDX-License-Identifier: GPL-2.0+
11 */
12
13 #include <config.h>
14 #include <version.h>
15
16 #define SDCTL0 0x221000
17 #define SDCTL1 0x221004
18
19
20 _TEXT_BASE:
21 .word CONFIG_SYS_TEXT_BASE
22
23 .globl lowlevel_init
24 lowlevel_init:
25 /* memory controller init */
26
27 ldr r1, =SDCTL0
28
29 /* Set Precharge Command */
30
31 ldr r3, =0x92120200
32 /* ldr r3, =0x92120251
33 */
34 str r3, [r1]
35
36 /* Issue Precharge All Commad */
37 ldr r3, =0x8200000
38 ldr r2, [r3]
39
40 /* Set AutoRefresh Command */
41 ldr r3, =0xA2120200
42 str r3, [r1]
43
44 /* Issue AutoRefresh Command */
45 ldr r3, =0x8000000
46 ldr r2, [r3]
47 ldr r2, [r3]
48 ldr r2, [r3]
49 ldr r2, [r3]
50 ldr r2, [r3]
51 ldr r2, [r3]
52 ldr r2, [r3]
53 ldr r2, [r3]
54
55 /* Set Mode Register */
56 ldr r3, =0xB2120200
57 str r3, [r1]
58
59 /* Issue Mode Register Command */
60 ldr r3, =0x08111800 /* Mode Register Value */
61 ldr r2, [r3]
62
63 /* Set Normal Mode */
64 ldr r3, =0x82124200
65 str r3, [r1]
66
67 /* everything is fine now */
68 mov pc, lr