Lines Matching +full:0 +full:x0000fc00
35 .para1 = 0, /* not used (only used when tpr13 bit 31 is set */
36 .para2 = 0, /* not used (only used when tpr13 bit 31 is set */
40 .mr3 = 0,
42 .tpr0 = 0x2ab83def,
43 .tpr1 = 0x18082356,
44 .tpr2 = 0x00034156,
45 .tpr3 = 0x448c5533,
46 .tpr4 = 0x08010d00,
47 .tpr5 = 0x0340b20f,
48 .tpr6 = 0x20d118cc,
49 .tpr7 = 0x14062485,
50 .tpr8 = 0x220d1d52,
51 .tpr9 = 0x1e078c22,
52 .tpr10 = 0x3c,
53 .tpr11 = 0, /* not used */
54 .tpr12 = 0, /* not used */
55 .tpr13 = 0x30000,
65 dram_para.tpr13 & 0x40000); in mctl_sys_init()
78 val = (readl(reg) >> 8) & 0xff; in mctl_apply_odt_correction()
82 if (val < 0) in mctl_apply_odt_correction()
83 val = 0; in mctl_apply_odt_correction()
87 clrsetbits_le32(reg, 0xff00, val << 8); in mctl_apply_odt_correction()
101 if (dram_para.tpr13 & 0x20) in mctl_init()
102 writel(0x40b, &mctl_phy->dcr); in mctl_init()
104 writel(0x1000040b, &mctl_phy->dcr); in mctl_init()
107 writel(0x5c000, &mctl_phy->dllgcr); in mctl_init()
109 writel(0xdc000, &mctl_phy->dllgcr); in mctl_init()
111 writel(0x0a003e3f, &mctl_phy->pgcr0); in mctl_init()
112 writel(0x03008421, &mctl_phy->pgcr1); in mctl_init()
119 if (!(dram_para.tpr13 & 0x10000)) { in mctl_init()
120 clrsetbits_le32(&mctl_phy->dx0gcr, 0x3800, 0x2000); in mctl_init()
121 clrsetbits_le32(&mctl_phy->dx1gcr, 0x3800, 0x2000); in mctl_init()
130 writel((dram_para.tpr0 & 0x000fffff), &mctl_phy->ptr2); in mctl_init()
131 writel((dram_para.tpr1 & 0x1fffffff), &mctl_phy->ptr3); in mctl_init()
132 writel((dram_para.tpr0 & 0x3ff00000) >> 2 | in mctl_init()
133 (dram_para.tpr2 & 0x0003ffff), &mctl_phy->ptr4); in mctl_init()
138 writel(0x01000081, &mctl_phy->dtcr); in mctl_init()
141 clrbits_le32(&mctl_phy->dx0gcr, 0x600); in mctl_init()
142 clrbits_le32(&mctl_phy->dx1gcr, 0x600); in mctl_init()
145 writel(0, &mctl_phy->odtcr); in mctl_init()
146 writel(0, &mctl_ctl->odtmap); in mctl_init()
149 writel(((dram_para.tpr5 & 0x0f00) << 12) | in mctl_init()
150 ((dram_para.tpr5 & 0x00f8) << 9) | in mctl_init()
151 ((dram_para.tpr5 & 0x0007) << 8), in mctl_init()
154 writel(((dram_para.tpr5 & 0x0003f000) << 12) | in mctl_init()
155 ((dram_para.tpr5 & 0x00fc0000) >> 2) | in mctl_init()
156 ((dram_para.tpr5 & 0x3f000000) >> 16) | in mctl_init()
157 ((dram_para.tpr6 & 0x0000003f) >> 0), in mctl_init()
160 writel(((dram_para.tpr6 & 0x000007c0) << 10) | in mctl_init()
161 ((dram_para.tpr6 & 0x0000f800) >> 3) | in mctl_init()
162 ((dram_para.tpr6 & 0x003f0000) >> 16), in mctl_init()
165 writel(((dram_para.tpr6 & 0x0fc00000) << 2) | in mctl_init()
166 ((dram_para.tpr7 & 0x0000001f) << 16) | in mctl_init()
167 ((dram_para.tpr7 & 0x000003e0) << 3) | in mctl_init()
168 ((dram_para.tpr7 & 0x0000fc00) >> 10), in mctl_init()
171 writel(((dram_para.tpr7 & 0x03ff0000) >> 16) | in mctl_init()
172 ((dram_para.tpr6 & 0xf0000000) >> 16), in mctl_init()
175 writel(((dram_para.tpr7 & 0x3c000000) >> 2 ) | in mctl_init()
176 ((dram_para.tpr8 & 0x00000007) << 16) | in mctl_init()
177 ((dram_para.tpr8 & 0x00000038) << 5) | in mctl_init()
178 ((dram_para.tpr8 & 0x000003c0) >> 6), in mctl_init()
181 writel(((dram_para.tpr8 & 0x00003c00) << 14) | in mctl_init()
182 ((dram_para.tpr8 & 0x0003c000) << 2) | in mctl_init()
183 ((dram_para.tpr8 & 0x00fc0000) >> 10) | in mctl_init()
184 ((dram_para.tpr8 & 0x0f000000) >> 24), in mctl_init()
187 writel(0x00000008, &mctl_ctl->dramtmg8); in mctl_init()
189 writel(((dram_para.tpr8 & 0xf0000000) >> 4) | in mctl_init()
190 ((dram_para.tpr9 & 0x00007c00) << 6) | in mctl_init()
191 ((dram_para.tpr9 & 0x000003e0) << 3) | in mctl_init()
192 ((dram_para.tpr9 & 0x0000001f) >> 0), in mctl_init()
195 setbits_le32(&mctl_ctl->pitmg1, 0x80000); in mctl_init()
197 writel(((dram_para.tpr9 & 0x003f8000) << 9) | 0x2001, in mctl_init()
203 writel(0x00000000, &mctl_ctl->pimisc); in mctl_init()
204 writel(0x80000000, &mctl_ctl->upd0); in mctl_init()
206 writel(((dram_para.tpr9 & 0xffc00000) >> 22) | in mctl_init()
207 ((dram_para.tpr10 & 0x00000fff) << 16), in mctl_init()
210 if (dram_para.tpr13 & 0x20) in mctl_init()
211 writel(0x01040001, &mctl_ctl->mstr); in mctl_init()
213 writel(0x01040401, &mctl_ctl->mstr); in mctl_init()
215 if (!(dram_para.tpr13 & 0x20000)) { in mctl_init()
216 writel(0x00000002, &mctl_ctl->pwrctl); in mctl_init()
217 writel(0x00008001, &mctl_ctl->pwrtmg); in mctl_init()
220 writel(0x00000001, &mctl_ctl->rfshctl3); in mctl_init()
221 writel(0x00000001, &mctl_ctl->pimisc); in mctl_init()
226 setbits_le32(&mctl_com->ccr, 0x80000); in mctl_init()
229 writel((dram_para.zq >> 8) & 0xff, &mctl_phy->zqcr1); in mctl_init()
231 writel(0x00000003, &mctl_phy->pir); in mctl_init()
233 mctl_await_completion(&mctl_phy->pgsr0, 0x09, 0x09); in mctl_init()
235 writel(readl(&mctl_phy->zqsr0) | 0x10000000, &mctl_phy->zqcr2); in mctl_init()
236 writel(dram_para.zq & 0xff, &mctl_phy->zqcr1); in mctl_init()
238 /* A23-v1.0 SDK uses 0xfdf3, A23-v2.0 SDK uses 0x5f3 */ in mctl_init()
239 writel(0x000005f3, &mctl_phy->pir); in mctl_init()
241 mctl_await_completion(&mctl_phy->pgsr0, 0x03, 0x03); in mctl_init()
243 if (readl(&mctl_phy->dx1gsr0) & 0x1000000) { in mctl_init()
245 writel(0, &mctl_phy->dx1gcr); in mctl_init()
246 writel(dram_para.zq & 0xff, &mctl_phy->zqcr1); in mctl_init()
247 writel(0x5f3, &mctl_phy->pir); in mctl_init()
249 setbits_le32(&mctl_ctl->mstr, 0x1000); in mctl_init()
260 mctl_await_completion(&mctl_ctl->statr, 0x01, 0x01); in mctl_init()
262 writel(0x08003e3f, &mctl_phy->pgcr0); in mctl_init()
263 writel(0x00000000, &mctl_ctl->rfshctl3); in mctl_init()
281 bus = 0; in sunxi_dram_init()
284 if (!(dram_para.tpr13 & 0x80000000)) { in sunxi_dram_init()
286 writel(0x000310f4 | MCTL_CR_PAGE_SIZE(page_size), in sunxi_dram_init()
288 setbits_le32(&mctl_com->swonr, 0x0003ffff); in sunxi_dram_init()
297 rows = (dram_para.para1 >> 16) & 0xff; in sunxi_dram_init()
298 writel(((dram_para.para2 & 0x000000f0) << 11) | in sunxi_dram_init()
300 ((dram_para.para1 & 0x0f000000) >> 22) | in sunxi_dram_init()
301 0x31000 | MCTL_CR_PAGE_SIZE(page_size), in sunxi_dram_init()
303 setbits_le32(&mctl_com->swonr, 0x0003ffff); in sunxi_dram_init()
307 writel(0x00000008, &mctl_com->mcr0_0); in sunxi_dram_init()
308 writel(0x0001000d, &mctl_com->mcr1_0); in sunxi_dram_init()
309 writel(0x00000004, &mctl_com->mcr0_1); in sunxi_dram_init()
310 writel(0x00000080, &mctl_com->mcr1_1); in sunxi_dram_init()
311 writel(0x00000004, &mctl_com->mcr0_2); in sunxi_dram_init()
312 writel(0x00000019, &mctl_com->mcr1_2); in sunxi_dram_init()
313 writel(0x00000004, &mctl_com->mcr0_3); in sunxi_dram_init()
314 writel(0x00000080, &mctl_com->mcr1_3); in sunxi_dram_init()
315 writel(0x00000004, &mctl_com->mcr0_4); in sunxi_dram_init()
316 writel(0x01010040, &mctl_com->mcr1_4); in sunxi_dram_init()
317 writel(0x00000004, &mctl_com->mcr0_5); in sunxi_dram_init()
318 writel(0x0001002f, &mctl_com->mcr1_5); in sunxi_dram_init()
319 writel(0x00000004, &mctl_com->mcr0_6); in sunxi_dram_init()
320 writel(0x00010020, &mctl_com->mcr1_6); in sunxi_dram_init()
321 writel(0x00000004, &mctl_com->mcr0_7); in sunxi_dram_init()
322 writel(0x00010020, &mctl_com->mcr1_7); in sunxi_dram_init()
323 writel(0x00000008, &mctl_com->mcr0_8); in sunxi_dram_init()
324 writel(0x00000001, &mctl_com->mcr1_8); in sunxi_dram_init()
325 writel(0x00000008, &mctl_com->mcr0_9); in sunxi_dram_init()
326 writel(0x00000005, &mctl_com->mcr1_9); in sunxi_dram_init()
327 writel(0x00000008, &mctl_com->mcr0_10); in sunxi_dram_init()
328 writel(0x00000003, &mctl_com->mcr1_10); in sunxi_dram_init()
329 writel(0x00000008, &mctl_com->mcr0_11); in sunxi_dram_init()
330 writel(0x00000005, &mctl_com->mcr1_11); in sunxi_dram_init()
331 writel(0x00000008, &mctl_com->mcr0_12); in sunxi_dram_init()
332 writel(0x00000003, &mctl_com->mcr1_12); in sunxi_dram_init()
333 writel(0x00000008, &mctl_com->mcr0_13); in sunxi_dram_init()
334 writel(0x00000004, &mctl_com->mcr1_13); in sunxi_dram_init()
335 writel(0x00000008, &mctl_com->mcr0_14); in sunxi_dram_init()
336 writel(0x00000002, &mctl_com->mcr1_14); in sunxi_dram_init()
337 writel(0x00000008, &mctl_com->mcr0_15); in sunxi_dram_init()
338 writel(0x00000003, &mctl_com->mcr1_15); in sunxi_dram_init()
339 writel(0x00010138, &mctl_com->bwcr); in sunxi_dram_init()