Lines Matching defs:pup
91 u32 delay, phase, pup, cs;
99 for (pup = 0;
100 pup < dram_info->num_of_total_pups;
101 pup++) {
102 if (pup == dram_info->num_of_std_pups
104 pup = ECC_PUP;
107 pup);
111 dram_info->rl_val[cs][pup][P] = phase;
116 dram_info->rl_val[cs][pup][D] = delay;
117 dram_info->rl_val[cs][pup][S] =
121 cs, pup);
122 dram_info->rl_val[cs][pup][DQS] =
130 for (pup = 0;
131 pup < (dram_info->num_of_total_pups);
132 pup++) {
133 if (pup == dram_info->num_of_std_pups
135 pup = ECC_PUP;
136 DEBUG_RL_S("DDR3 - Read Leveling - PUP: ");
137 DEBUG_RL_D((u32) pup, 1);
140 rl_val[cs][pup][P], 1);
143 rl_val[cs][pup][D], 2);
181 u32 reg, cs, ecc, pup_num, phase, delay, pup;
265 for (pup = 0;
266 pup < (dram_info->num_of_std_pups + dram_info->ecc_ena);
267 pup++) {
268 DEBUG_RL_S("DDR3 - Read Leveling - PUP: ");
269 DEBUG_RL_D((u32) pup, 1);
271 DEBUG_RL_D((u32) dram_info->rl_val[cs][pup][P], 1);
273 DEBUG_RL_D((u32) dram_info->rl_val[cs][pup][D], 2);
283 for (pup = 0;
284 pup < (dram_info->num_of_std_pups + dram_info->ecc_ena);
285 pup++) {
287 pup_num = (pup == dram_info->num_of_std_pups) ? ECC_BIT : pup;
290 phase = dram_info->rl_val[cs][pup][P];
291 delay = dram_info->rl_val[cs][pup][D];
335 static void overrun(u32 cs, MV_DRAM_INFO *info, u32 pup, u32 locked_pups,
341 if (((~locked_pups >> pup) & 0x1) && (final_delay == 0)) {
344 idx = pup + ecc * ECC_BIT;
346 /* PUP passed, start examining */
351 DEBUG_RL_FULL_C("DDR3 - Read Leveling - We have no overrun and a match on pup: ",
352 (u32)pup, 1);
355 /* If pup got to last state - lock the delays */
364 DEBUG_RL_FULL_C("DDR3 - Read Leveling - We have locked pup: ",
365 (u32)pup, 1);
371 DEBUG_RL_FULL_C("DDR3 - Read Leveling - We got first lock on pup: ",
372 (u32)pup, 1);
377 * If pup is in not in final state but
403 u32 reg, delay, phase, pup, rd_sample_delay, add, locked_pups,
420 for (pup = 0; pup < (dram_info->num_of_std_pups * (1 - ecc) + ecc);
421 pup++)
422 dram_info->rl_val[cs][pup + ecc * ECC_BIT][S] = 0;
466 for (pup = 0; pup < (dram_info->num_of_std_pups * (1 - ecc) + ecc); pup++) {
469 (REG_DRAM_TRAINING_2_OVERRUN_OFFS + pup)) & 0x1)) {
470 overrun(cs, dram_info, pup, locked_pups,
475 DEBUG_RL_FULL_C("DDR3 - Read Leveling - We got overrun on pup: ",
476 (u32)pup, 1);
514 idx = pup + ecc * ECC_BIT;
544 /* some Pup was Locked */
558 /* NO Pup was Locked */
570 /* some Pup was Locked */
576 for (pup = 0; pup < (dram_info->num_of_std_pups * (1 - ecc) + ecc); pup++) {
581 pup, 1);
587 /* No Pup was Locked */
604 for (pup = 0; pup < (dram_info->num_of_std_pups * (1 - ecc) + ecc); pup++) {
609 pup, 1);
677 for (pup = 0; pup <
679 pup++) {
688 for (pup = 0; pup < (dram_info->num_of_std_pups); pup++) {
689 if (dram_info->rl_val[cs][pup][PS] < phase_min)
690 phase_min = dram_info->rl_val[cs][pup][PS];
730 for (pup = 0; pup < dram_info->num_of_total_pups; pup++) {
731 reg = ddr3_read_pup_reg(PUP_RL_MODE + 0x1, cs, pup);
732 dram_info->rl_val[cs][pup][DQS] = (reg & 0x3F);
755 u32 reg, delay, phase, sum, pup, rd_sample_delay, add, locked_pups,
774 for (pup = 0; pup < (dram_info->num_of_std_pups * (1 - ecc) + ecc);
775 pup++)
776 dram_info->rl_val[cs][pup + ecc * ECC_BIT][S] = 0;
819 for (pup = 0; pup < (dram_info->num_of_std_pups *
820 (1 - ecc) + ecc); pup++) {
824 idx = pup + ecc * ECC_BIT;
829 pup)) & 0x1)) {
838 if (((~locked_pups >> pup) & 0x1)
841 DEBUG_RL_FULL_C("DDR3 - Read Leveling - We got another match inside the window for pup: ",
842 (u32)pup, 1);
851 DEBUG_RL_FULL_C("DDR3 - Read Leveling - We finished the window for pup: ",
852 (u32)pup, 1);
865 if (((~locked_pups >> pup) & 0x1)) {
867 DEBUG_RL_FULL_C("DDR3 - Read Leveling - We have no overrun and a match on pup: ",
868 (u32)pup, 1);
871 /* If pup got to last state - lock the delays */
885 DEBUG_RL_FULL_C("DDR3 - Read Leveling - We got first lock on pup: ",
886 (u32)pup, 1);
893 /* if pup is in not in final state but there was match - dont increment counter */
902 DEBUG_RL_FULL_C("DDR3 - Read Leveling - We got overrun on pup: ",
903 (u32)pup, 1);
982 /* No Pup was Locked */
996 /* Some Pup was Locked */
1004 /* No Pup was Locked */
1079 for (pup = 0;
1080 pup <
1082 pup++) {
1091 for (pup = 0; pup < (dram_info->num_of_std_pups); pup++) {
1092 DEBUG_RL_S("DDR3 - Read Leveling - Window info - PUP: ");
1093 DEBUG_RL_D((u32) pup, 1);
1095 DEBUG_RL_D((u32) dram_info->rl_val[cs][pup][PS], 1);
1097 DEBUG_RL_D((u32) dram_info->rl_val[cs][pup][DS], 2);
1099 DEBUG_RL_D((u32) dram_info->rl_val[cs][pup][PE], 1);
1101 DEBUG_RL_D((u32) dram_info->rl_val[cs][pup][DE], 2);
1106 for (pup = 0; pup < (dram_info->num_of_std_pups * (1 - ecc) + ecc);
1107 pup++) {
1205 for (pup = 0; pup < dram_info->num_of_total_pups; pup++) {
1206 reg = ddr3_read_pup_reg(PUP_RL_MODE + 0x1, cs, pup);
1207 dram_info->rl_val[cs][pup][DQS] = (reg & 0x3F);