]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/MAI/AmigaOneG3SE/start.txt
* Patch by Thomas Frieden, 13 Nov 2002:
[karo-tx-uboot.git] / board / MAI / AmigaOneG3SE / start.txt
1 \r
2         /*------------------------------------------------------*/\r
3         /*              TERON Articia / SDRAM Init              */\r
4         /*------------------------------------------------------*/\r
5 \r
6 *       XD_CTL  = 0x81000000                    (0x74)\r
7 \r
8 *       HBUS_ACC_CTL_0 &= 0xFFFFFDFF            (0x5c)\r
9                        /* host bus access ctl reg 2(5e) */\r
10                        /* set - CPU read from memory data one clock after data is latched */\r
11 \r
12 *       GLOBL_INFO_0 |= 0x00004000              (0x50)\r
13                       /* global info register 2 (52), AGP/PCI bus 1 arbiter is addressed in Articia S */\r
14 \r
15         PCI_1_SB_CONFIG_0 |= 0x00000400         (0x80d0)\r
16                         /* PCI1 side band config reg 2 (d2), enable read acces while write buffer not empty */\r
17 \r
18         MEM_RAS_CTL_0 |= 0x3f000000             (0xcc)\r
19                       &= 0x3fffffff\r
20                       /* RAS park control reg 0(cc), park access enable is set */\r
21                       \r
22         HOST_RDBUF_CTL |= 0x10000000            (0x70)\r
23                        &= 0x10ffffff\r
24                       /* host read buffer control reg, enable prefetch for CPU read from DRAM control */\r
25 \r
26         HBUS_ACC_CTL_0 |= 0x0100001f            (0x5c)\r
27                        &= 0xf1ffffff\r
28                       /* host bus access control register, enable CPU address bus pipe control  */\r
29                       /* two outstanding requests,  *** changed to 2 from 3                             */\r
30                       /* enable line merge write control for CPU write to system memory, PCI 1  */\r
31                       /* and PCI 0 bus memory; enable page merge write control for write to             */\r
32                       /* PCI bus 0 & bus 1 memory                                                       */\r
33 \r
34         SRAM_CTL |= 0x00004000                  (0xc8)\r
35                  &= 0xffbff7ff\r
36                       /* DRAM detail timing control register 1 (ca), bit 3 set to 0     */\r
37                       /* DRAM start access latency control - wait for one clock */\r
38                       /* ff9f changed to ffbf                                           */\r
39     \r
40         DIM0_TIM_CTL_0 = 0x737d737d             (0xc9)\r
41                       /* DRAM timing control for dimm0 & dimm1; set wait one clock      */\r
42                       /* cycle for next data access                                     */\r
43 \r
44         DIM2_TIM_CTL_0 = 0x737d737d             (0xca)\r
45                       /* DRAM timing control for dimm2 & dimm3; set wait one clock      */\r
46                       /* cycle for next data access                                     */\r
47 \r
48         DIM0_BNK0_CTL_0 = BNK0_RAM_SIZ_128MB    (0x90)\r
49                       /* set dimm0 bank0 for 128 MB     */\r
50 \r
51         DIM0_BNK1_CTL_0 = BNK1_RAM_SIZ_128MB    (0x94)\r
52                       /* set dimm0 for  bank1           */\r
53 \r
54         DIM0_TIM_CTL_0 = 0xf3bf0000             (0xc9)\r
55                       /* dimm0 timing control register; RAS - CAS latency - 4 clock             */\r
56                       /* CAS access latency - 3 wait; pre-charge latency - 3 wait               */\r
57                       /* pre-charge command period control - 5 clock; wait one clock            */\r
58                       /* cycle for next data access; read to write access latency control       */\r
59                       /* - 2 clock cycles                                                       */\r
60 \r
61         DRAM_GBL_CTL_0 |= 0x00000100            (0xc0)\r
62                        &= 0xffff01ff\r
63                       /* memory global control register - support buffer sdram on bank 0        */\r
64 \r
65         DRAM_ECC_CTL_0 |= 0x00260000            (0xc4)\r
66                        &= 0xff26ffff\r
67                       /* enable ECC; enable read, modify, write control */\r
68  \r
69         DRAM_REF_CTL_0 = DRAM_REF_DATA          (0xb8)\r
70                       /* set DRAM refresh parameters *** changed to 00940100    */\r
71 \r
72         nop\r
73         nop\r
74         nop\r
75         nop\r
76         nop\r
77 \r
78         DRAM_ECC_CTL_0 |= 0x20243280            (0xc4)\r
79                       /* turn off ecc           */\r
80                       /* for SDRAM bank 0       */\r
81 \r
82         DRAM_ECC_CTL_0 |= 0x20243290            (0xc4) ?\r
83                       /* for SDRAM bank 1       */\r
84  \r
85 \r
86 /* Additional Stuff...*/\r
87 \r
88         GLOBL_CTRL |= 0x20000b00                (0x54)\r
89 \r
90         PCI_0_SB_CONFIG |= 0x04100007           (0xd0)\r
91                       /* PCI 0 Side band config reg*/\r
92 \r
93         0x8000083c |= 0x00080000\r
94                       /* Disable VGA decode on PCI Bus 1 */\r
95 \r
96 \r
97 /*End Additional Stuff..*/\r
98 \r
99         /*--------------------------------------------------------------*/\r
100         /*              TERON serial port initialization code           */\r
101         /*--------------------------------------------------------------*/\r
102 \r
103         0x84380080 |= 0x00030000\r
104                      /* enable super IO configuration VIA chip Register 85      */\r
105                      /* Enable super I/O config mode */\r
106 \r
107         0xfe0003f0 = 0xe2\r
108         bl delay1\r
109 \r
110         0xfe0003f1 = 0x0f\r
111         bl delay1\r
112                     /* enable com1 & com2, parallel port disabled */ \r
113         \r
114         0xfe0003f0 = 0xe7\r
115         bl delay1\r
116                     /* let's make com1 base as 0x3f8 */\r
117         \r
118         0xfe0003f1 = 0xfe\r
119         bl delay1\r
120 \r
121         0xfe0003f0 = 0xe8\r
122         bl delay1           \r
123                     /* let's make com2 base as 0x2f8 */\r
124 \r
125         0xfe0003f1 = 0xbe\r
126 \r
127         0x84380080 &= 0xfffdffff\r
128                     /* closing super IO configuration VIA chip Register 85   */\r
129      \r
130 \r
131 /* -------------------------------*/\r
132 \r
133         0xfe0003fb = 0x83\r
134         bl delay1\r
135                    /*latch enable word length -8 bit */         /* set mslab bit        */\r
136         0xfe0003f8 = 0x0c\r
137         bl delay1\r
138                    /* set baud rate lsb for 9600 baud   */\r
139         0xfe0003f9 = 0x0\r
140         bl delay1\r
141                    /* set baud rate msb for 9600 baud   */\r
142         0xfe0003fb  = 0x03\r
143         bl delay1\r
144                       /* reset mslab    */\r
145 \r
146         /*--------------------------------------------------------------*/\r
147         /*              END TERON Serial Port Initialization Code       */\r
148         /*--------------------------------------------------------------*/\r
149 \r
150    \r
151 \r
152         /*--------------------------------------------------------------*/\r
153         /*      END TERON Articia / SDRAM Initialization code           */\r
154         /*--------------------------------------------------------------*/\r
155 \r
156 Proposed from Documentation:\r
157 \r
158 write dmem 0xfec00cf8 0x50000080\r
159 write dmem 0xfee00cfc 0xc0305411\r
160 \r
161       Writes to index 0x50-0x53. \r
162       0x50: Global Information Register 0\r
163             0xC0 = Little Endian CPU, Sequential order Burst\r
164       0x51: Global Information Register 1\r
165             Read only, 0x30 = Provides PowerPC and X86 support\r
166       0x52: Global Information Register 2\r
167             0x05 = 64/128 bit CPU bus support\r
168       0x53: Global Information Register 3\r
169             0x80 = PCI Bus 0 grant active time is 1 clock after REQ# deasserted\r
170 \r
171 write dmem 0xfec00cf8 0x5c000080\r
172 write dmem 0xfee00cfc 0xb300011F\r
173 \r
174 write dmem 0xfec00cf8 0xc8000080\r
175 write dmem 0xfee00cfc 0x0020f100\r
176 \r
177 write dmem 0xfec00cf8 0x90000080\r
178 write dmem 0xfee00cfc 0x007fe700\r
179 \r
180 write dmem 0xfec00cf8 0x9400080\r
181 write dmem 0xfee00cfc 0x007fe700\r
182 \r
183 write dmem 0xfec00cf8 0xb0000080\r
184 write dmem 0xfee00cfc 0x737d737d\r
185 \r
186 write dmem 0xfec00cf8 0xb4000080\r
187 write dmem 0xfee00cfc 0x737d737d\r
188 \r
189 write dmem 0xfec00cf8 0xc0000080\r
190 write dmem 0xfee00cfc 0x40005500\r
191 \r
192 write dmem 0xfec00cf8 0xb8000080\r
193 write dmem 0xfee00cfc 0x00940100\r
194 \r
195 write dmem 0xfec00cf8 0xc4000080\r
196 write dmem 0xfee00cfc 0x00003280\r
197 \r
198 write dmem 0xfec00cf8 0xc4000080\r
199 write dmem 0xfee00cfc 0x00003290\r
200 \r
201 \r