Lines Matching refs:next

210 	struct nvkm_ram_data *next = ram->base.next;  in r1373f4_fini()  local
211 u8 v0 = next->bios.ramcfg_11_03_c0; in r1373f4_fini()
212 u8 v1 = next->bios.ramcfg_11_03_30; in r1373f4_fini()
243 u32 next = (prev & ~mask) | data; in gk104_ram_nuts() local
244 nvkm_memx_wr32(fuc->memx, addr, next); in gk104_ram_nuts()
255 struct nvkm_ram_data *next = ram->base.next; in gk104_ram_calc_gddr5() local
256 int vc = !next->bios.ramcfg_11_02_08; in gk104_ram_calc_gddr5()
257 int mv = !next->bios.ramcfg_11_02_04; in gk104_ram_calc_gddr5()
311 switch (next->bios.ramcfg_11_03_c0) { in gk104_ram_calc_gddr5()
318 switch (next->bios.ramcfg_11_03_30) { in gk104_ram_calc_gddr5()
326 if (next->bios.ramcfg_11_02_80) in gk104_ram_calc_gddr5()
328 if (next->bios.ramcfg_11_02_40) in gk104_ram_calc_gddr5()
330 if (next->bios.ramcfg_11_07_10) in gk104_ram_calc_gddr5()
332 if (next->bios.ramcfg_11_07_08) in gk104_ram_calc_gddr5()
367 if (next->bios.ramcfg_11_02_40 || in gk104_ram_calc_gddr5()
368 next->bios.ramcfg_11_07_10) { in gk104_ram_calc_gddr5()
391 if (next->bios.ramcfg_11_07_40) in gk104_ram_calc_gddr5()
395 ram_wr32(fuc, 0x10f65c, 0x00000011 * next->bios.rammap_11_11_0c); in gk104_ram_calc_gddr5()
396 ram_wr32(fuc, 0x10f6b8, 0x01010101 * next->bios.ramcfg_11_09); in gk104_ram_calc_gddr5()
397 ram_wr32(fuc, 0x10f6bc, 0x01010101 * next->bios.ramcfg_11_09); in gk104_ram_calc_gddr5()
399 if (!next->bios.ramcfg_11_07_08 && !next->bios.ramcfg_11_07_04) { in gk104_ram_calc_gddr5()
400 ram_wr32(fuc, 0x10f698, 0x01010101 * next->bios.ramcfg_11_04); in gk104_ram_calc_gddr5()
401 ram_wr32(fuc, 0x10f69c, 0x01010101 * next->bios.ramcfg_11_04); in gk104_ram_calc_gddr5()
403 if (!next->bios.ramcfg_11_07_08) { in gk104_ram_calc_gddr5()
409 u32 data = 0x01000100 * next->bios.ramcfg_11_04; in gk104_ram_calc_gddr5()
414 if (ram->mode == 2 && next->bios.ramcfg_11_08_10) in gk104_ram_calc_gddr5()
422 if (!next->bios.ramcfg_11_02_80) in gk104_ram_calc_gddr5()
424 if (!next->bios.ramcfg_11_02_40) in gk104_ram_calc_gddr5()
426 if (!next->bios.ramcfg_11_07_10) in gk104_ram_calc_gddr5()
428 if (!next->bios.ramcfg_11_07_08) in gk104_ram_calc_gddr5()
434 if (next->bios.ramcfg_11_01_08) in gk104_ram_calc_gddr5()
445 if (next->bios.ramcfg_11_08_01) in gk104_ram_calc_gddr5()
452 if (next->bios.ramcfg_11_08_08) in gk104_ram_calc_gddr5()
454 if (next->bios.ramcfg_11_08_04) in gk104_ram_calc_gddr5()
456 if (next->bios.ramcfg_11_08_02) in gk104_ram_calc_gddr5()
461 ram_mask(fuc, 0x10f248, 0xffffffff, next->bios.timing[10]); in gk104_ram_calc_gddr5()
462 ram_mask(fuc, 0x10f290, 0xffffffff, next->bios.timing[0]); in gk104_ram_calc_gddr5()
463 ram_mask(fuc, 0x10f294, 0xffffffff, next->bios.timing[1]); in gk104_ram_calc_gddr5()
464 ram_mask(fuc, 0x10f298, 0xffffffff, next->bios.timing[2]); in gk104_ram_calc_gddr5()
465 ram_mask(fuc, 0x10f29c, 0xffffffff, next->bios.timing[3]); in gk104_ram_calc_gddr5()
466 ram_mask(fuc, 0x10f2a0, 0xffffffff, next->bios.timing[4]); in gk104_ram_calc_gddr5()
467 ram_mask(fuc, 0x10f2a4, 0xffffffff, next->bios.timing[5]); in gk104_ram_calc_gddr5()
468 ram_mask(fuc, 0x10f2a8, 0xffffffff, next->bios.timing[6]); in gk104_ram_calc_gddr5()
469 ram_mask(fuc, 0x10f2ac, 0xffffffff, next->bios.timing[7]); in gk104_ram_calc_gddr5()
470 ram_mask(fuc, 0x10f2cc, 0xffffffff, next->bios.timing[8]); in gk104_ram_calc_gddr5()
471 ram_mask(fuc, 0x10f2e8, 0xffffffff, next->bios.timing[9]); in gk104_ram_calc_gddr5()
475 if (next->bios.ramcfg_11_08_20) in gk104_ram_calc_gddr5()
483 data |= next->bios.ramcfg_11_02_03 << 8; in gk104_ram_calc_gddr5()
487 if (next->bios.ramcfg_11_01_10) in gk104_ram_calc_gddr5()
495 data |= next->bios.timing_20_30_07 << 28; in gk104_ram_calc_gddr5()
499 if (next->bios.ramcfg_11_01_01) in gk104_ram_calc_gddr5()
507 data |= next->bios.timing_20_30_07 << 28; in gk104_ram_calc_gddr5()
511 if (next->bios.ramcfg_11_01_02) in gk104_ram_calc_gddr5()
519 if (!next->bios.ramcfg_11_01_04) in gk104_ram_calc_gddr5()
521 if (!next->bios.ramcfg_11_07_80) in gk104_ram_calc_gddr5()
526 if (next->bios.ramcfg_11_03_f0) { in gk104_ram_calc_gddr5()
527 if (next->bios.rammap_11_08_0c) { in gk104_ram_calc_gddr5()
528 if (!next->bios.ramcfg_11_07_80) in gk104_ram_calc_gddr5()
541 ram_wr32(fuc, 0x10f870, 0x11111111 * next->bios.ramcfg_11_03_0f); in gk104_ram_calc_gddr5()
545 data |= next->bios.ramcfg_11_02_03; in gk104_ram_calc_gddr5()
549 if (next->bios.ramcfg_11_01_10) in gk104_ram_calc_gddr5()
560 data = next->bios.timing_20_30_07 << 8; in gk104_ram_calc_gddr5()
561 if (next->bios.ramcfg_11_01_01) in gk104_ram_calc_gddr5()
565 ram_mask(fuc, 0x10f250, 0x000003f0, next->bios.timing_20_2c_003f << 4); in gk104_ram_calc_gddr5()
566 data = (next->bios.timing[10] & 0x7f000000) >> 24; in gk104_ram_calc_gddr5()
567 if (data < next->bios.timing_20_2c_1fc0) in gk104_ram_calc_gddr5()
568 data = next->bios.timing_20_2c_1fc0; in gk104_ram_calc_gddr5()
570 ram_mask(fuc, 0x10f224, 0x001f0000, next->bios.timing_20_30_f8 << 16); in gk104_ram_calc_gddr5()
572 ram_mask(fuc, 0x10fec4, 0x041e0f07, next->bios.timing_20_31_0800 << 26 | in gk104_ram_calc_gddr5()
573 next->bios.timing_20_31_0780 << 17 | in gk104_ram_calc_gddr5()
574 next->bios.timing_20_31_0078 << 8 | in gk104_ram_calc_gddr5()
575 next->bios.timing_20_31_0007); in gk104_ram_calc_gddr5()
576 ram_mask(fuc, 0x10fec8, 0x00000027, next->bios.timing_20_31_8000 << 5 | in gk104_ram_calc_gddr5()
577 next->bios.timing_20_31_7000); in gk104_ram_calc_gddr5()
585 if (next->bios.ramcfg_11_08_10 && (ram->mode == 2) /*XXX*/) { in gk104_ram_calc_gddr5()
618 if (!next->bios.ramcfg_11_07_08) { in gk104_ram_calc_gddr5()
619 if (!next->bios.ramcfg_11_07_04) in gk104_ram_calc_gddr5()
633 if (!next->bios.ramcfg_11_07_08) { in gk104_ram_calc_gddr5()
635 if ( next->bios.ramcfg_11_07_04) in gk104_ram_calc_gddr5()
637 if (!next->bios.rammap_11_08_10) in gk104_ram_calc_gddr5()
659 if (next->bios.ramcfg_11_07_02) in gk104_ram_calc_gddr5()
667 if (next->bios.rammap_11_08_01) in gk104_ram_calc_gddr5()
706 struct nvkm_ram_data *next = ram->base.next; in gk104_ram_calc_sddr3() local
707 int vc = !next->bios.ramcfg_11_02_08; in gk104_ram_calc_sddr3()
708 int mv = !next->bios.ramcfg_11_02_04; in gk104_ram_calc_sddr3()
726 if (next->bios.ramcfg_11_03_f0) in gk104_ram_calc_sddr3()
731 if (next->bios.ramcfg_DLLoff) in gk104_ram_calc_sddr3()
755 switch (next->bios.ramcfg_11_03_c0) { in gk104_ram_calc_sddr3()
762 switch (next->bios.ramcfg_11_03_30) { in gk104_ram_calc_sddr3()
770 if (next->bios.ramcfg_11_02_80) in gk104_ram_calc_sddr3()
772 if (next->bios.ramcfg_11_02_40) in gk104_ram_calc_sddr3()
774 if (next->bios.ramcfg_11_07_10) in gk104_ram_calc_sddr3()
776 if (next->bios.ramcfg_11_07_08) in gk104_ram_calc_sddr3()
786 data |= next->bios.ramcfg_11_03_30 << 16; in gk104_ram_calc_sddr3()
818 if (next->bios.ramcfg_11_02_40 || in gk104_ram_calc_sddr3()
819 next->bios.ramcfg_11_07_10) { in gk104_ram_calc_sddr3()
825 if (next->bios.ramcfg_11_07_40) in gk104_ram_calc_sddr3()
829 ram_wr32(fuc, 0x10f65c, 0x00000011 * next->bios.rammap_11_11_0c); in gk104_ram_calc_sddr3()
830 ram_wr32(fuc, 0x10f6b8, 0x01010101 * next->bios.ramcfg_11_09); in gk104_ram_calc_sddr3()
831 ram_wr32(fuc, 0x10f6bc, 0x01010101 * next->bios.ramcfg_11_09); in gk104_ram_calc_sddr3()
835 if (!next->bios.ramcfg_11_02_80) in gk104_ram_calc_sddr3()
837 if (!next->bios.ramcfg_11_02_40) in gk104_ram_calc_sddr3()
839 if (!next->bios.ramcfg_11_07_10) in gk104_ram_calc_sddr3()
841 if (!next->bios.ramcfg_11_07_08) in gk104_ram_calc_sddr3()
848 if (next->bios.ramcfg_11_08_01) in gk104_ram_calc_sddr3()
855 ram_mask(fuc, 0x10f248, 0xffffffff, next->bios.timing[10]); in gk104_ram_calc_sddr3()
856 ram_mask(fuc, 0x10f290, 0xffffffff, next->bios.timing[0]); in gk104_ram_calc_sddr3()
857 ram_mask(fuc, 0x10f294, 0xffffffff, next->bios.timing[1]); in gk104_ram_calc_sddr3()
858 ram_mask(fuc, 0x10f298, 0xffffffff, next->bios.timing[2]); in gk104_ram_calc_sddr3()
859 ram_mask(fuc, 0x10f29c, 0xffffffff, next->bios.timing[3]); in gk104_ram_calc_sddr3()
860 ram_mask(fuc, 0x10f2a0, 0xffffffff, next->bios.timing[4]); in gk104_ram_calc_sddr3()
861 ram_mask(fuc, 0x10f2a4, 0xffffffff, next->bios.timing[5]); in gk104_ram_calc_sddr3()
862 ram_mask(fuc, 0x10f2a8, 0xffffffff, next->bios.timing[6]); in gk104_ram_calc_sddr3()
863 ram_mask(fuc, 0x10f2ac, 0xffffffff, next->bios.timing[7]); in gk104_ram_calc_sddr3()
864 ram_mask(fuc, 0x10f2cc, 0xffffffff, next->bios.timing[8]); in gk104_ram_calc_sddr3()
865 ram_mask(fuc, 0x10f2e8, 0xffffffff, next->bios.timing[9]); in gk104_ram_calc_sddr3()
869 if (!next->bios.ramcfg_11_01_04) in gk104_ram_calc_sddr3()
871 if (!next->bios.ramcfg_11_07_80) in gk104_ram_calc_sddr3()
876 if (next->bios.ramcfg_11_03_f0) { in gk104_ram_calc_sddr3()
877 if (next->bios.rammap_11_08_0c) { in gk104_ram_calc_sddr3()
878 if (!next->bios.ramcfg_11_07_80) in gk104_ram_calc_sddr3()
892 ram_wr32(fuc, 0x10f870, 0x11111111 * next->bios.ramcfg_11_03_0f); in gk104_ram_calc_sddr3()
894 ram_mask(fuc, 0x10f250, 0x000003f0, next->bios.timing_20_2c_003f << 4); in gk104_ram_calc_sddr3()
896 data = (next->bios.timing[10] & 0x7f000000) >> 24; in gk104_ram_calc_sddr3()
897 if (data < next->bios.timing_20_2c_1fc0) in gk104_ram_calc_sddr3()
898 data = next->bios.timing_20_2c_1fc0; in gk104_ram_calc_sddr3()
901 ram_mask(fuc, 0x10f224, 0x001f0000, next->bios.timing_20_30_f8 << 16); in gk104_ram_calc_sddr3()
911 if (!next->bios.ramcfg_DLLoff) { in gk104_ram_calc_sddr3()
921 if (!next->bios.ramcfg_DLLoff) { in gk104_ram_calc_sddr3()
949 if (next->bios.rammap_11_08_01) in gk104_ram_calc_sddr3()
1041 gk104_ram_calc_xits(struct gk104_ram *ram, struct nvkm_ram_data *next) in gk104_ram_calc_xits() argument
1052 ram->mode = (next->freq > fuc->refpll.vco1.max_freq) ? 2 : 1; in gk104_ram_calc_xits()
1063 refclk = next->freq; in gk104_ram_calc_xits()
1065 ret = gk104_pll_calc_hiclk(next->freq, subdev->device->crystal, in gk104_ram_calc_xits()
1074 " (refclock: %i kHz)\n", next->freq, ret); in gk104_ram_calc_xits()
1090 ram->base.freq = next->freq; in gk104_ram_calc_xits()
1096 ret = gk104_ram_calc_sddr3(ram, next->freq); in gk104_ram_calc_xits()
1101 ret = gk104_ram_calc_gddr5(ram, next->freq); in gk104_ram_calc_xits()
1120 if (ram->base.next == NULL) { in gk104_ram_calc()
1143 ram->base.next = &ram->base.target; in gk104_ram_calc()
1145 ram->base.next = &ram->base.xition; in gk104_ram_calc()
1147 BUG_ON(ram->base.next != &ram->base.xition); in gk104_ram_calc()
1148 ram->base.next = &ram->base.target; in gk104_ram_calc()
1151 return gk104_ram_calc_xits(ram, ram->base.next); in gk104_ram_calc()
1236 struct nvkm_ram_data *next = ram->base.next; in gk104_ram_prog() local
1240 return (ram->base.next == &ram->base.xition); in gk104_ram_prog()
1245 gk104_ram_prog_0(ram, next->freq); in gk104_ram_prog()
1247 return (ram->base.next == &ram->base.xition); in gk104_ram_prog()
1254 ram->base.next = NULL; in gk104_ram_tidy()