Lines Matching +full:0 +full:x20010000
112 u32 part = nvkm_rd32(device, 0x022438), i; in gf100_ram_train()
113 u32 mask = nvkm_rd32(device, 0x022554); in gf100_ram_train()
114 u32 addr = 0x110974; in gf100_ram_train()
116 ram_wr32(fuc, 0x10f910, magic); in gf100_ram_train()
117 ram_wr32(fuc, 0x10f914, magic); in gf100_ram_train()
119 for (i = 0; (magic & 0x80000000) && i < part; addr += 0x1000, i++) { in gf100_ram_train()
122 ram_wait(fuc, addr, 0x0000000f, 0x00000000, 500000); in gf100_ram_train()
149 if (!rammap.data || ver != 0x10 || rammap.size < 0x0e) { in gf100_ram_calc()
162 if (!ramcfg.data || ver != 0x10 || ramcfg.size < 0x0e) { in gf100_ram_calc()
168 strap = nvbios_rd08(bios, ramcfg.data + 0x01); in gf100_ram_calc()
169 if (strap != 0xff) { in gf100_ram_calc()
172 if (!timing.data || ver != 0x10 || timing.size < 0x19) { in gf100_ram_calc()
177 timing.data = 0; in gf100_ram_calc()
185 from = !!(ram_rd32(fuc, 0x1373f0) & 0x00000002); /*XXX: ok? */ in gf100_ram_calc()
188 if (!(ram_rd32(fuc, 0x137300) & 0x00000100)) in gf100_ram_calc()
196 ram_mask(fuc, 0x137360, 0x00000002, 0x00000000); in gf100_ram_calc()
198 if ((ram_rd32(fuc, 0x132000) & 0x00000002) || 0 /*XXX*/) { in gf100_ram_calc()
199 ram_nuke(fuc, 0x132000); in gf100_ram_calc()
200 ram_mask(fuc, 0x132000, 0x00000002, 0x00000002); in gf100_ram_calc()
201 ram_mask(fuc, 0x132000, 0x00000002, 0x00000000); in gf100_ram_calc()
205 ram_nuke(fuc, 0x10fe20); in gf100_ram_calc()
206 ram_mask(fuc, 0x10fe20, 0x00000002, 0x00000002); in gf100_ram_calc()
207 ram_mask(fuc, 0x10fe20, 0x00000002, 0x00000000); in gf100_ram_calc()
210 // 0x00020034 // 0x0000000a in gf100_ram_calc()
211 ram_wr32(fuc, 0x132100, 0x00000001); in gf100_ram_calc()
213 if (mode == 1 && from == 0) { in gf100_ram_calc()
217 if (ret <= 0) { in gf100_ram_calc()
222 ram_wr32(fuc, 0x10fe20, 0x20010000); in gf100_ram_calc()
223 ram_wr32(fuc, 0x137320, 0x00000003); in gf100_ram_calc()
224 ram_wr32(fuc, 0x137330, 0x81200006); in gf100_ram_calc()
225 ram_wr32(fuc, 0x10fe24, (P << 16) | (N1 << 8) | M1); in gf100_ram_calc()
226 ram_wr32(fuc, 0x10fe20, 0x20010001); in gf100_ram_calc()
227 ram_wait(fuc, 0x137390, 0x00020000, 0x00020000, 64000); in gf100_ram_calc()
232 if (ret <= 0) { in gf100_ram_calc()
237 ram_wr32(fuc, 0x10fe20, 0x20010005); in gf100_ram_calc()
238 ram_wr32(fuc, 0x132004, (P << 16) | (N1 << 8) | M1); in gf100_ram_calc()
239 ram_wr32(fuc, 0x132000, 0x18010101); in gf100_ram_calc()
240 ram_wait(fuc, 0x137390, 0x00000002, 0x00000002, 64000); in gf100_ram_calc()
242 if (mode == 0) { in gf100_ram_calc()
243 ram_wr32(fuc, 0x137300, 0x00000003); in gf100_ram_calc()
246 if (from == 0) { in gf100_ram_calc()
247 ram_nuke(fuc, 0x10fb04); in gf100_ram_calc()
248 ram_mask(fuc, 0x10fb04, 0x0000ffff, 0x00000000); in gf100_ram_calc()
249 ram_nuke(fuc, 0x10fb08); in gf100_ram_calc()
250 ram_mask(fuc, 0x10fb08, 0x0000ffff, 0x00000000); in gf100_ram_calc()
251 ram_wr32(fuc, 0x10f988, 0x2004ff00); in gf100_ram_calc()
252 ram_wr32(fuc, 0x10f98c, 0x003fc040); in gf100_ram_calc()
253 ram_wr32(fuc, 0x10f990, 0x20012001); in gf100_ram_calc()
254 ram_wr32(fuc, 0x10f998, 0x00011a00); in gf100_ram_calc()
255 ram_wr32(fuc, 0x13d8f4, 0x00000000); in gf100_ram_calc()
257 ram_wr32(fuc, 0x10f988, 0x20010000); in gf100_ram_calc()
258 ram_wr32(fuc, 0x10f98c, 0x00000000); in gf100_ram_calc()
259 ram_wr32(fuc, 0x10f990, 0x20012001); in gf100_ram_calc()
260 ram_wr32(fuc, 0x10f998, 0x00010a00); in gf100_ram_calc()
263 if (from == 0) { in gf100_ram_calc()
264 // 0x00020039 // 0x000000ba in gf100_ram_calc()
267 // 0x0002003a // 0x00000002 in gf100_ram_calc()
268 ram_wr32(fuc, 0x100b0c, 0x00080012); in gf100_ram_calc()
269 // 0x00030014 // 0x00000000 // 0x02b5f070 in gf100_ram_calc()
270 // 0x00030014 // 0x00010000 // 0x02b5f070 in gf100_ram_calc()
271 ram_wr32(fuc, 0x611200, 0x00003300); in gf100_ram_calc()
272 // 0x00020034 // 0x0000000a in gf100_ram_calc()
273 // 0x00030020 // 0x00000001 // 0x00000000 in gf100_ram_calc()
275 ram_mask(fuc, 0x10f200, 0x00000800, 0x00000000); in gf100_ram_calc()
276 ram_wr32(fuc, 0x10f210, 0x00000000); in gf100_ram_calc()
278 if (mode == 0) in gf100_ram_calc()
279 gf100_ram_train(fuc, 0x000c1001); in gf100_ram_calc()
280 ram_wr32(fuc, 0x10f310, 0x00000001); in gf100_ram_calc()
282 ram_wr32(fuc, 0x10f090, 0x00000061); in gf100_ram_calc()
283 ram_wr32(fuc, 0x10f090, 0xc000007f); in gf100_ram_calc()
286 if (from == 0) { in gf100_ram_calc()
287 ram_wr32(fuc, 0x10f824, 0x00007fd4); in gf100_ram_calc()
289 ram_wr32(fuc, 0x1373ec, 0x00020404); in gf100_ram_calc()
292 if (mode == 0) { in gf100_ram_calc()
293 ram_mask(fuc, 0x10f808, 0x00080000, 0x00000000); in gf100_ram_calc()
294 ram_mask(fuc, 0x10f200, 0x00008000, 0x00008000); in gf100_ram_calc()
295 ram_wr32(fuc, 0x10f830, 0x41500010); in gf100_ram_calc()
296 ram_mask(fuc, 0x10f830, 0x01000000, 0x00000000); in gf100_ram_calc()
297 ram_mask(fuc, 0x132100, 0x00000100, 0x00000100); in gf100_ram_calc()
298 ram_wr32(fuc, 0x10f050, 0xff000090); in gf100_ram_calc()
299 ram_wr32(fuc, 0x1373ec, 0x00020f0f); in gf100_ram_calc()
300 ram_wr32(fuc, 0x1373f0, 0x00000003); in gf100_ram_calc()
301 ram_wr32(fuc, 0x137310, 0x81201616); in gf100_ram_calc()
302 ram_wr32(fuc, 0x132100, 0x00000001); in gf100_ram_calc()
303 // 0x00020039 // 0x000000ba in gf100_ram_calc()
304 ram_wr32(fuc, 0x10f830, 0x00300017); in gf100_ram_calc()
305 ram_wr32(fuc, 0x1373f0, 0x00000001); in gf100_ram_calc()
306 ram_wr32(fuc, 0x10f824, 0x00007e77); in gf100_ram_calc()
307 ram_wr32(fuc, 0x132000, 0x18030001); in gf100_ram_calc()
308 ram_wr32(fuc, 0x10f090, 0x4000007e); in gf100_ram_calc()
310 ram_wr32(fuc, 0x10f314, 0x00000001); in gf100_ram_calc()
311 ram_wr32(fuc, 0x10f210, 0x80000000); in gf100_ram_calc()
312 ram_wr32(fuc, 0x10f338, 0x00300220); in gf100_ram_calc()
313 ram_wr32(fuc, 0x10f300, 0x0000011d); in gf100_ram_calc()
315 ram_wr32(fuc, 0x10f290, 0x02060505); in gf100_ram_calc()
316 ram_wr32(fuc, 0x10f294, 0x34208288); in gf100_ram_calc()
317 ram_wr32(fuc, 0x10f298, 0x44050411); in gf100_ram_calc()
318 ram_wr32(fuc, 0x10f29c, 0x0000114c); in gf100_ram_calc()
319 ram_wr32(fuc, 0x10f2a0, 0x42e10069); in gf100_ram_calc()
320 ram_wr32(fuc, 0x10f614, 0x40044f77); in gf100_ram_calc()
321 ram_wr32(fuc, 0x10f610, 0x40044f77); in gf100_ram_calc()
322 ram_wr32(fuc, 0x10f344, 0x00600009); in gf100_ram_calc()
324 ram_wr32(fuc, 0x10f348, 0x00700008); in gf100_ram_calc()
325 ram_wr32(fuc, 0x61c140, 0x19240000); in gf100_ram_calc()
326 ram_wr32(fuc, 0x10f830, 0x00300017); in gf100_ram_calc()
327 gf100_ram_train(fuc, 0x80021001); in gf100_ram_calc()
328 gf100_ram_train(fuc, 0x80081001); in gf100_ram_calc()
329 ram_wr32(fuc, 0x10f340, 0x00500004); in gf100_ram_calc()
331 ram_wr32(fuc, 0x10f830, 0x01300017); in gf100_ram_calc()
332 ram_wr32(fuc, 0x10f830, 0x00300017); in gf100_ram_calc()
333 // 0x00030020 // 0x00000000 // 0x00000000 in gf100_ram_calc()
334 // 0x00020034 // 0x0000000b in gf100_ram_calc()
335 ram_wr32(fuc, 0x100b0c, 0x00080028); in gf100_ram_calc()
336 ram_wr32(fuc, 0x611200, 0x00003330); in gf100_ram_calc()
338 ram_wr32(fuc, 0x10f800, 0x00001800); in gf100_ram_calc()
339 ram_wr32(fuc, 0x13d8f4, 0x00000000); in gf100_ram_calc()
340 ram_wr32(fuc, 0x1373ec, 0x00020404); in gf100_ram_calc()
341 ram_wr32(fuc, 0x1373f0, 0x00000003); in gf100_ram_calc()
342 ram_wr32(fuc, 0x10f830, 0x40700010); in gf100_ram_calc()
343 ram_wr32(fuc, 0x10f830, 0x40500010); in gf100_ram_calc()
344 ram_wr32(fuc, 0x13d8f4, 0x00000000); in gf100_ram_calc()
345 ram_wr32(fuc, 0x1373f8, 0x00000000); in gf100_ram_calc()
346 ram_wr32(fuc, 0x132100, 0x00000101); in gf100_ram_calc()
347 ram_wr32(fuc, 0x137310, 0x89201616); in gf100_ram_calc()
348 ram_wr32(fuc, 0x10f050, 0xff000090); in gf100_ram_calc()
349 ram_wr32(fuc, 0x1373ec, 0x00030404); in gf100_ram_calc()
350 ram_wr32(fuc, 0x1373f0, 0x00000002); in gf100_ram_calc()
351 // 0x00020039 // 0x00000011 in gf100_ram_calc()
352 ram_wr32(fuc, 0x132100, 0x00000001); in gf100_ram_calc()
353 ram_wr32(fuc, 0x1373f8, 0x00002000); in gf100_ram_calc()
355 ram_wr32(fuc, 0x10f808, 0x7aaa0050); in gf100_ram_calc()
356 ram_wr32(fuc, 0x10f830, 0x00500010); in gf100_ram_calc()
357 ram_wr32(fuc, 0x10f200, 0x00ce1000); in gf100_ram_calc()
358 ram_wr32(fuc, 0x10f090, 0x4000007e); in gf100_ram_calc()
360 ram_wr32(fuc, 0x10f314, 0x00000001); in gf100_ram_calc()
361 ram_wr32(fuc, 0x10f210, 0x80000000); in gf100_ram_calc()
362 ram_wr32(fuc, 0x10f338, 0x00300200); in gf100_ram_calc()
363 ram_wr32(fuc, 0x10f300, 0x0000084d); in gf100_ram_calc()
365 ram_wr32(fuc, 0x10f290, 0x0b343825); in gf100_ram_calc()
366 ram_wr32(fuc, 0x10f294, 0x3483028e); in gf100_ram_calc()
367 ram_wr32(fuc, 0x10f298, 0x440c0600); in gf100_ram_calc()
368 ram_wr32(fuc, 0x10f29c, 0x0000214c); in gf100_ram_calc()
369 ram_wr32(fuc, 0x10f2a0, 0x42e20069); in gf100_ram_calc()
370 ram_wr32(fuc, 0x10f200, 0x00ce0000); in gf100_ram_calc()
371 ram_wr32(fuc, 0x10f614, 0x60044e77); in gf100_ram_calc()
372 ram_wr32(fuc, 0x10f610, 0x60044e77); in gf100_ram_calc()
373 ram_wr32(fuc, 0x10f340, 0x00500000); in gf100_ram_calc()
375 ram_wr32(fuc, 0x10f344, 0x00600228); in gf100_ram_calc()
377 ram_wr32(fuc, 0x10f348, 0x00700000); in gf100_ram_calc()
378 ram_wr32(fuc, 0x13d8f4, 0x00000000); in gf100_ram_calc()
379 ram_wr32(fuc, 0x61c140, 0x09a40000); in gf100_ram_calc()
381 gf100_ram_train(fuc, 0x800e1008); in gf100_ram_calc()
384 ram_wr32(fuc, 0x10f800, 0x00001804); in gf100_ram_calc()
385 // 0x00030020 // 0x00000000 // 0x00000000 in gf100_ram_calc()
386 // 0x00020034 // 0x0000000b in gf100_ram_calc()
387 ram_wr32(fuc, 0x13d8f4, 0x00000000); in gf100_ram_calc()
388 ram_wr32(fuc, 0x100b0c, 0x00080028); in gf100_ram_calc()
389 ram_wr32(fuc, 0x611200, 0x00003330); in gf100_ram_calc()
391 ram_wr32(fuc, 0x10f9b0, 0x05313f41); in gf100_ram_calc()
392 ram_wr32(fuc, 0x10f9b4, 0x00002f50); in gf100_ram_calc()
394 gf100_ram_train(fuc, 0x010c1001); in gf100_ram_calc()
397 ram_mask(fuc, 0x10f200, 0x00000800, 0x00000800); in gf100_ram_calc()
398 // 0x00020016 // 0x00000000 in gf100_ram_calc()
400 if (mode == 0) in gf100_ram_calc()
401 ram_mask(fuc, 0x132000, 0x00000001, 0x00000000); in gf100_ram_calc()
403 return 0; in gf100_ram_calc()
412 return 0; in gf100_ram_prog()
426 0x00, 0xff, 0x55, 0xaa, 0x33, 0xcc, in gf100_ram_init()
427 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, in gf100_ram_init()
430 0x00000000, 0xffffffff, in gf100_ram_init()
431 0x55555555, 0xaaaaaaaa, in gf100_ram_init()
432 0x33333333, 0xcccccccc, in gf100_ram_init()
433 0xf0f0f0f0, 0x0f0f0f0f, in gf100_ram_init()
434 0x00ff00ff, 0xff00ff00, in gf100_ram_init()
435 0x0000ffff, 0xffff0000, in gf100_ram_init()
445 return 0; in gf100_ram_init()
449 for (i = 0; i < 0x30; i++) { in gf100_ram_init()
450 nvkm_wr32(device, 0x10f968, 0x00000000 | (i << 8)); in gf100_ram_init()
451 nvkm_wr32(device, 0x10f96c, 0x00000000 | (i << 8)); in gf100_ram_init()
452 nvkm_wr32(device, 0x10f920, 0x00000100 | train0[i % 12]); in gf100_ram_init()
453 nvkm_wr32(device, 0x10f924, 0x00000100 | train0[i % 12]); in gf100_ram_init()
454 nvkm_wr32(device, 0x10f918, train1[i % 12]); in gf100_ram_init()
455 nvkm_wr32(device, 0x10f91c, train1[i % 12]); in gf100_ram_init()
456 nvkm_wr32(device, 0x10f920, 0x00000000 | train0[i % 12]); in gf100_ram_init()
457 nvkm_wr32(device, 0x10f924, 0x00000000 | train0[i % 12]); in gf100_ram_init()
458 nvkm_wr32(device, 0x10f918, train1[i % 12]); in gf100_ram_init()
459 nvkm_wr32(device, 0x10f91c, train1[i % 12]); in gf100_ram_init()
462 return 0; in gf100_ram_init()
468 return nvkm_rd32(device, 0x11020c + (fbpa * 0x1000)); in gf100_ram_probe_fbpa_amount()
479 return 0; in gf100_ram_probe_fbp_amount()
486 u32 fbpao = nvkm_rd32(device, 0x022554); in gf100_ram_probe_fbp()
500 u32 fbps = nvkm_rd32(device, 0x022438); in gf100_ram_ctor()
501 u64 total = 0, lcomm = ~0, lower, ubase, usize; in gf100_ram_ctor()
502 int ret, fbp, ltcs, ltcn = 0; in gf100_ram_ctor()
505 for (fbp = 0; fbp < fbps; fbp++) { in gf100_ram_ctor()
522 nvkm_debug(subdev, "Lower: %4lld MiB @ %010llx\n", lower >> 20, 0ULL); in gf100_ram_ctor()
563 return 0; in gf100_ram_ctor()
583 ret = nvbios_pll_parse(bios, 0x0c, &ram->refpll); in gf100_ram_new_()
589 ret = nvbios_pll_parse(bios, 0x04, &ram->mempll); in gf100_ram_new_()
595 ram->fuc.r_0x10fe20 = ramfuc_reg(0x10fe20); in gf100_ram_new_()
596 ram->fuc.r_0x10fe24 = ramfuc_reg(0x10fe24); in gf100_ram_new_()
597 ram->fuc.r_0x137320 = ramfuc_reg(0x137320); in gf100_ram_new_()
598 ram->fuc.r_0x137330 = ramfuc_reg(0x137330); in gf100_ram_new_()
600 ram->fuc.r_0x132000 = ramfuc_reg(0x132000); in gf100_ram_new_()
601 ram->fuc.r_0x132004 = ramfuc_reg(0x132004); in gf100_ram_new_()
602 ram->fuc.r_0x132100 = ramfuc_reg(0x132100); in gf100_ram_new_()
604 ram->fuc.r_0x137390 = ramfuc_reg(0x137390); in gf100_ram_new_()
606 ram->fuc.r_0x10f290 = ramfuc_reg(0x10f290); in gf100_ram_new_()
607 ram->fuc.r_0x10f294 = ramfuc_reg(0x10f294); in gf100_ram_new_()
608 ram->fuc.r_0x10f298 = ramfuc_reg(0x10f298); in gf100_ram_new_()
609 ram->fuc.r_0x10f29c = ramfuc_reg(0x10f29c); in gf100_ram_new_()
610 ram->fuc.r_0x10f2a0 = ramfuc_reg(0x10f2a0); in gf100_ram_new_()
612 ram->fuc.r_0x10f300 = ramfuc_reg(0x10f300); in gf100_ram_new_()
613 ram->fuc.r_0x10f338 = ramfuc_reg(0x10f338); in gf100_ram_new_()
614 ram->fuc.r_0x10f340 = ramfuc_reg(0x10f340); in gf100_ram_new_()
615 ram->fuc.r_0x10f344 = ramfuc_reg(0x10f344); in gf100_ram_new_()
616 ram->fuc.r_0x10f348 = ramfuc_reg(0x10f348); in gf100_ram_new_()
618 ram->fuc.r_0x10f910 = ramfuc_reg(0x10f910); in gf100_ram_new_()
619 ram->fuc.r_0x10f914 = ramfuc_reg(0x10f914); in gf100_ram_new_()
621 ram->fuc.r_0x100b0c = ramfuc_reg(0x100b0c); in gf100_ram_new_()
622 ram->fuc.r_0x10f050 = ramfuc_reg(0x10f050); in gf100_ram_new_()
623 ram->fuc.r_0x10f090 = ramfuc_reg(0x10f090); in gf100_ram_new_()
624 ram->fuc.r_0x10f200 = ramfuc_reg(0x10f200); in gf100_ram_new_()
625 ram->fuc.r_0x10f210 = ramfuc_reg(0x10f210); in gf100_ram_new_()
626 ram->fuc.r_0x10f310 = ramfuc_reg(0x10f310); in gf100_ram_new_()
627 ram->fuc.r_0x10f314 = ramfuc_reg(0x10f314); in gf100_ram_new_()
628 ram->fuc.r_0x10f610 = ramfuc_reg(0x10f610); in gf100_ram_new_()
629 ram->fuc.r_0x10f614 = ramfuc_reg(0x10f614); in gf100_ram_new_()
630 ram->fuc.r_0x10f800 = ramfuc_reg(0x10f800); in gf100_ram_new_()
631 ram->fuc.r_0x10f808 = ramfuc_reg(0x10f808); in gf100_ram_new_()
632 ram->fuc.r_0x10f824 = ramfuc_reg(0x10f824); in gf100_ram_new_()
633 ram->fuc.r_0x10f830 = ramfuc_reg(0x10f830); in gf100_ram_new_()
634 ram->fuc.r_0x10f988 = ramfuc_reg(0x10f988); in gf100_ram_new_()
635 ram->fuc.r_0x10f98c = ramfuc_reg(0x10f98c); in gf100_ram_new_()
636 ram->fuc.r_0x10f990 = ramfuc_reg(0x10f990); in gf100_ram_new_()
637 ram->fuc.r_0x10f998 = ramfuc_reg(0x10f998); in gf100_ram_new_()
638 ram->fuc.r_0x10f9b0 = ramfuc_reg(0x10f9b0); in gf100_ram_new_()
639 ram->fuc.r_0x10f9b4 = ramfuc_reg(0x10f9b4); in gf100_ram_new_()
640 ram->fuc.r_0x10fb04 = ramfuc_reg(0x10fb04); in gf100_ram_new_()
641 ram->fuc.r_0x10fb08 = ramfuc_reg(0x10fb08); in gf100_ram_new_()
642 ram->fuc.r_0x137310 = ramfuc_reg(0x137300); in gf100_ram_new_()
643 ram->fuc.r_0x137310 = ramfuc_reg(0x137310); in gf100_ram_new_()
644 ram->fuc.r_0x137360 = ramfuc_reg(0x137360); in gf100_ram_new_()
645 ram->fuc.r_0x1373ec = ramfuc_reg(0x1373ec); in gf100_ram_new_()
646 ram->fuc.r_0x1373f0 = ramfuc_reg(0x1373f0); in gf100_ram_new_()
647 ram->fuc.r_0x1373f8 = ramfuc_reg(0x1373f8); in gf100_ram_new_()
649 ram->fuc.r_0x61c140 = ramfuc_reg(0x61c140); in gf100_ram_new_()
650 ram->fuc.r_0x611200 = ramfuc_reg(0x611200); in gf100_ram_new_()
652 ram->fuc.r_0x13d8f4 = ramfuc_reg(0x13d8f4); in gf100_ram_new_()
653 return 0; in gf100_ram_new_()
658 .upper = 0x0200000000ULL,