Lines Matching refs:nmhz

206 	uint32_t nmhz = timing_config->freq;  in ddr3_get_parameter()  local
212 pdram_timing->mhz = nmhz; in ddr3_get_parameter()
215 if (nmhz <= 330) in ddr3_get_parameter()
217 else if (nmhz <= 400) in ddr3_get_parameter()
219 else if (nmhz <= 533) in ddr3_get_parameter()
221 else if (nmhz <= 666) in ddr3_get_parameter()
223 else if (nmhz <= 800) in ddr3_get_parameter()
225 else if (nmhz <= 933) in ddr3_get_parameter()
231 if (nmhz < 300) { in ddr3_get_parameter()
271 pdram_timing->trstl = ((DDR3_TRSTL * nmhz + 999) / 1000); in ddr3_get_parameter()
272 pdram_timing->trsth = ((DDR3_TRSTH * nmhz + 999) / 1000); in ddr3_get_parameter()
274 pdram_timing->trefi = ((DDR3_TREFI_7_8_US * nmhz + 999) / 1000); in ddr3_get_parameter()
279 tmp = ((DDR3_TWR * nmhz + 999) / 1000); in ddr3_get_parameter()
296 tmp = ((DDR3_TRTP * nmhz + (nmhz >> 1) + 999) / 1000); in ddr3_get_parameter()
299 (((ddr3_trc_tfaw[ddr_speed_bin] >> 8) * nmhz + 999) / 1000); in ddr3_get_parameter()
300 tmp = ((DDR3_TRRD * nmhz + 999) / 1000); in ddr3_get_parameter()
303 tmp = ((DDR3_TWTR * nmhz + (nmhz >> 1) + 999) / 1000); in ddr3_get_parameter()
307 pdram_timing->tras_min = ((DDR3_TRAS * nmhz + (nmhz >> 1) + 999) in ddr3_get_parameter()
310 (((ddr3_trc_tfaw[ddr_speed_bin] & 0x0ff) * nmhz + 999) in ddr3_get_parameter()
323 pdram_timing->trfc = (tmp * nmhz + 999) / 1000; in ddr3_get_parameter()
324 pdram_timing->txsnr = max(5, (((tmp + 10) * nmhz + 999) / 1000)); in ddr3_get_parameter()
328 tmp = ((DDR3_TXP * nmhz + (nmhz >> 1) + 999) / 1000); in ddr3_get_parameter()
330 tmp = ((DDR3_TXPDLL * nmhz + 999) / 1000); in ddr3_get_parameter()
333 if (nmhz >= 533) in ddr3_get_parameter()
334 tmp = ((DDR3_TCKE_533MHZ * nmhz + 999) / 1000); in ddr3_get_parameter()
336 tmp = ((DDR3_TCKE_400MHZ * nmhz + (nmhz >> 1) + 999) / 1000); in ddr3_get_parameter()
339 tmp = ((DDR3_TCKSRE * nmhz + 999) / 1000); in ddr3_get_parameter()
343 tmp = ((DDR3_TMOD * nmhz + 999) / 1000); in ddr3_get_parameter()
350 tmp = ((DDR3_TZQINIT * nmhz + 999) / 1000); in ddr3_get_parameter()
352 tmp = ((DDR3_TZQCS * nmhz + 999) / 1000); in ddr3_get_parameter()
354 tmp = ((DDR3_TZQOPER * nmhz + 999) / 1000); in ddr3_get_parameter()
359 pdram_timing->twlo = ((DDR3_TWLO * nmhz + (nmhz >> 1) + 999) / 1000); in ddr3_get_parameter()
423 uint32_t nmhz = timing_config->freq; in lpddr2_get_parameter() local
428 pdram_timing->mhz = nmhz; in lpddr2_get_parameter()
436 if (nmhz <= 266) { in lpddr2_get_parameter()
440 } else if (nmhz <= 333) { in lpddr2_get_parameter()
444 } else if (nmhz <= 400) { in lpddr2_get_parameter()
448 } else if (nmhz <= 466) { in lpddr2_get_parameter()
480 pdram_timing->tinit1 = (LPDDR2_TINIT1 * nmhz + 999) / 1000; in lpddr2_get_parameter()
482 pdram_timing->tinit3 = (LPDDR2_TINIT3 * nmhz + 999) / 1000; in lpddr2_get_parameter()
483 pdram_timing->tinit4 = (LPDDR2_TINIT4 * nmhz + 999) / 1000; in lpddr2_get_parameter()
484 pdram_timing->tinit5 = (LPDDR2_TINIT5 * nmhz + 999) / 1000; in lpddr2_get_parameter()
486 pdram_timing->trsth = (LPDDR2_TRSTH * nmhz + 999) / 1000; in lpddr2_get_parameter()
492 pdram_timing->trefi = (LPDDR2_TREFI_3_9_US * nmhz + 999) in lpddr2_get_parameter()
495 pdram_timing->trefi = (LPDDR2_TREFI_7_8_US * nmhz + 999) in lpddr2_get_parameter()
498 tmp = ((LPDDR2_TRCD * nmhz + 999) / 1000); in lpddr2_get_parameter()
503 trppb_tmp = ((LPDDR2_TRP_PB * nmhz + 999) / 1000); in lpddr2_get_parameter()
510 trp_tmp = ((LPDDR2_TRP_AB_8_BANK * nmhz + 999) / 1000); in lpddr2_get_parameter()
513 twr_tmp = ((LPDDR2_TWR * nmhz + 999) / 1000); in lpddr2_get_parameter()
519 tmp = ((LPDDR2_TRTP * nmhz + (nmhz >> 1) + 999) / 1000); in lpddr2_get_parameter()
521 tras_tmp = ((LPDDR2_TRAS * nmhz + 999) / 1000); in lpddr2_get_parameter()
524 pdram_timing->tras_max = ((LPDDR2_TRAS_MAX * nmhz + 999) / 1000); in lpddr2_get_parameter()
526 tmp = ((LPDDR2_TRRD * nmhz + 999) / 1000); in lpddr2_get_parameter()
530 if (nmhz > 200) in lpddr2_get_parameter()
531 tmp = ((LPDDR2_TWTR_GREAT_200MHZ * nmhz + (nmhz >> 1) + in lpddr2_get_parameter()
534 tmp = ((LPDDR2_TWTR_LITTLE_200MHZ * nmhz + 999) / 1000); in lpddr2_get_parameter()
537 if (nmhz <= 200) in lpddr2_get_parameter()
538 pdram_timing->tfaw = (LPDDR2_TFAW_LITTLE_200MHZ * nmhz + 999) in lpddr2_get_parameter()
541 pdram_timing->tfaw = (LPDDR2_TFAW_GREAT_200MHZ * nmhz + 999) in lpddr2_get_parameter()
546 (LPDDR2_TRFC_8GBIT * nmhz + 999) / 1000; in lpddr2_get_parameter()
547 tmp = (((LPDDR2_TRFC_8GBIT + 10) * nmhz + 999) / 1000); in lpddr2_get_parameter()
550 (LPDDR2_TRFC_4GBIT * nmhz + 999) / 1000; in lpddr2_get_parameter()
551 tmp = (((LPDDR2_TRFC_4GBIT + 10) * nmhz + 999) / 1000); in lpddr2_get_parameter()
558 pdram_timing->tdqsck = ((LPDDR2_TDQSCK_MIN * nmhz + (nmhz >> 1)) in lpddr2_get_parameter()
561 ((LPDDR2_TDQSCK_MAX * nmhz + (nmhz >> 1) + 999) in lpddr2_get_parameter()
564 tmp = ((LPDDR2_TXP * nmhz + (nmhz >> 1) + 999) / 1000); in lpddr2_get_parameter()
569 tmp = ((LPDDR2_TCKESR * nmhz + 999) / 1000); in lpddr2_get_parameter()
578 pdram_timing->tzqinit = (LPDDR2_TZQINIT * nmhz + 999) / 1000; in lpddr2_get_parameter()
579 tmp = ((LPDDR2_TZQCS * nmhz + 999) / 1000); in lpddr2_get_parameter()
581 tmp = ((LPDDR2_TZQCL * nmhz + 999) / 1000); in lpddr2_get_parameter()
583 tmp = ((LPDDR2_TZQRESET * nmhz + 999) / 1000); in lpddr2_get_parameter()
663 uint32_t nmhz = timing_config->freq; in lpddr3_get_parameter() local
668 pdram_timing->mhz = nmhz; in lpddr3_get_parameter()
678 if (nmhz <= 400) { in lpddr3_get_parameter()
682 } else if (nmhz <= 533) { in lpddr3_get_parameter()
686 } else if (nmhz <= 600) { in lpddr3_get_parameter()
690 } else if (nmhz <= 667) { in lpddr3_get_parameter()
694 } else if (nmhz <= 733) { in lpddr3_get_parameter()
698 } else if (nmhz <= 800) { in lpddr3_get_parameter()
702 } else if (nmhz <= 933) { in lpddr3_get_parameter()
755 pdram_timing->tinit1 = (LPDDR3_TINIT1 * nmhz + 999) / 1000; in lpddr3_get_parameter()
757 pdram_timing->tinit3 = (LPDDR3_TINIT3 * nmhz + 999) / 1000; in lpddr3_get_parameter()
758 pdram_timing->tinit4 = (LPDDR3_TINIT4 * nmhz + 999) / 1000; in lpddr3_get_parameter()
759 pdram_timing->tinit5 = (LPDDR3_TINIT5 * nmhz + 999) / 1000; in lpddr3_get_parameter()
761 pdram_timing->trsth = (LPDDR3_TRSTH * nmhz + 999) / 1000; in lpddr3_get_parameter()
763 pdram_timing->trefi = (LPDDR3_TREFI_3_9_US * nmhz + 999) / 1000; in lpddr3_get_parameter()
765 tmp = ((LPDDR3_TRCD * nmhz + 999) / 1000); in lpddr3_get_parameter()
767 trppb_tmp = ((LPDDR3_TRP_PB * nmhz + 999) / 1000); in lpddr3_get_parameter()
770 trp_tmp = ((LPDDR3_TRP_AB * nmhz + 999) / 1000); in lpddr3_get_parameter()
773 twr_tmp = ((LPDDR3_TWR * nmhz + 999) / 1000); in lpddr3_get_parameter()
791 tmp = ((LPDDR3_TRTP * nmhz + (nmhz >> 1) + 999) / 1000); in lpddr3_get_parameter()
793 tras_tmp = ((LPDDR3_TRAS * nmhz + 999) / 1000); in lpddr3_get_parameter()
797 tmp = ((LPDDR3_TRRD * nmhz + 999) / 1000); in lpddr3_get_parameter()
800 tmp = ((LPDDR3_TWTR * nmhz + (nmhz >> 1) + 999) / 1000); in lpddr3_get_parameter()
802 pdram_timing->trtw = ((LPDDR3_TRTW * nmhz + 999) / 1000); in lpddr3_get_parameter()
803 pdram_timing->tras_max = ((LPDDR3_TRAS_MAX * nmhz + 999) / 1000); in lpddr3_get_parameter()
804 tmp = (LPDDR3_TFAW * nmhz + 999) / 1000; in lpddr3_get_parameter()
808 (LPDDR3_TRFC_8GBIT * nmhz + 999) / 1000; in lpddr3_get_parameter()
809 tmp = (((LPDDR3_TRFC_8GBIT + 10) * nmhz + 999) / 1000); in lpddr3_get_parameter()
812 (LPDDR3_TRFC_4GBIT * nmhz + 999) / 1000; in lpddr3_get_parameter()
813 tmp = (((LPDDR3_TRFC_4GBIT + 10) * nmhz + 999) / 1000); in lpddr3_get_parameter()
819 ((LPDDR3_TDQSCK_MIN * nmhz + (nmhz >> 1)) in lpddr3_get_parameter()
822 ((LPDDR3_TDQSCK_MAX * nmhz + (nmhz >> 1) + 999) in lpddr3_get_parameter()
825 tmp = ((LPDDR3_TXP * nmhz + (nmhz >> 1) + 999) / 1000); in lpddr3_get_parameter()
828 tmp = ((LPDDR3_TCKE * nmhz + (nmhz >> 1) + 999) / 1000); in lpddr3_get_parameter()
830 tmp = ((LPDDR3_TCKESR * nmhz + 999) / 1000); in lpddr3_get_parameter()
836 tmp = ((LPDDR3_TMRD * nmhz + 999) / 1000); in lpddr3_get_parameter()
839 tmp = ((LPDDR3_TRCD * nmhz + 999) / 1000); in lpddr3_get_parameter()
842 pdram_timing->todton = (LPDDR3_TODTON * nmhz + (nmhz >> 1) + 999) in lpddr3_get_parameter()
845 pdram_timing->tzqinit = (LPDDR3_TZQINIT * nmhz + 999) / 1000; in lpddr3_get_parameter()
847 ((LPDDR3_TZQCS * nmhz + 999) / 1000); in lpddr3_get_parameter()
849 ((LPDDR3_TZQCL * nmhz + 999) / 1000); in lpddr3_get_parameter()
850 tmp = ((LPDDR3_TZQRESET * nmhz + 999) / 1000); in lpddr3_get_parameter()
853 pdram_timing->twlmrd = (LPDDR3_TWLMRD * nmhz + 999) / 1000; in lpddr3_get_parameter()
854 pdram_timing->twlo = (LPDDR3_TWLO * nmhz + 999) / 1000; in lpddr3_get_parameter()
855 pdram_timing->twldqsen = (LPDDR3_TWLDQSEN * nmhz + 999) / 1000; in lpddr3_get_parameter()
862 pdram_timing->tadr = (LPDDR3_TADR * nmhz + 999) / 1000; in lpddr3_get_parameter()
863 pdram_timing->tmrz = (LPDDR3_TMRZ * nmhz + 999) / 1000; in lpddr3_get_parameter()
867 pdram_timing->tfc_long = (LPDDR3_TFC_LONG * nmhz + 999) / 1000; in lpddr3_get_parameter()
959 uint32_t nmhz = timing_config->freq; in lpddr4_get_parameter() local
964 pdram_timing->mhz = nmhz; in lpddr4_get_parameter()
983 if (nmhz <= 266) { in lpddr4_get_parameter()
989 } else if (nmhz <= 533) { in lpddr4_get_parameter()
1001 } else if (nmhz <= 800) { in lpddr4_get_parameter()
1013 } else if (nmhz <= 1066) { in lpddr4_get_parameter()
1025 } else if (nmhz <= 1333) { in lpddr4_get_parameter()
1039 } else if (nmhz <= 1600) { in lpddr4_get_parameter()
1053 } else if (nmhz <= 1866) { in lpddr4_get_parameter()
1155 pdram_timing->tinit1 = (LPDDR4_TINIT1 * nmhz + 999) / 1000; in lpddr4_get_parameter()
1156 pdram_timing->tinit2 = (LPDDR4_TINIT2 * nmhz + 999) / 1000; in lpddr4_get_parameter()
1157 pdram_timing->tinit3 = (LPDDR4_TINIT3 * nmhz + 999) / 1000; in lpddr4_get_parameter()
1158 pdram_timing->tinit4 = (LPDDR4_TINIT4 * nmhz + 999) / 1000; in lpddr4_get_parameter()
1159 pdram_timing->tinit5 = (LPDDR4_TINIT5 * nmhz + 999) / 1000; in lpddr4_get_parameter()
1160 pdram_timing->trstl = (LPDDR4_TRSTL * nmhz + 999) / 1000; in lpddr4_get_parameter()
1161 pdram_timing->trsth = (LPDDR4_TRSTH * nmhz + 999) / 1000; in lpddr4_get_parameter()
1163 pdram_timing->trefi = (LPDDR4_TREFI_3_9_US * nmhz + 999) / 1000; in lpddr4_get_parameter()
1165 tmp = ((LPDDR4_TRCD * nmhz + 999) / 1000); in lpddr4_get_parameter()
1167 trppb_tmp = ((LPDDR4_TRP_PB * nmhz + 999) / 1000); in lpddr4_get_parameter()
1170 trp_tmp = ((LPDDR4_TRP_AB * nmhz + 999) / 1000); in lpddr4_get_parameter()
1173 tras_tmp = ((LPDDR4_TRAS * nmhz + 999) / 1000); in lpddr4_get_parameter()
1177 tmp = ((LPDDR4_TRRD * nmhz + 999) / 1000); in lpddr4_get_parameter()
1184 tmp = ((LPDDR4_TWTR * nmhz + 999) / 1000); in lpddr4_get_parameter()
1186 pdram_timing->trtw = ((LPDDR4_TRTW * nmhz + 999) / 1000); in lpddr4_get_parameter()
1187 pdram_timing->tras_max = ((LPDDR4_TRAS_MAX * nmhz + 999) / 1000); in lpddr4_get_parameter()
1188 pdram_timing->tfaw = (LPDDR4_TFAW * nmhz + 999) / 1000; in lpddr4_get_parameter()
1192 (LPDDR4_TRFC_12GBIT * nmhz + 999) / 1000; in lpddr4_get_parameter()
1193 tmp = (((LPDDR4_TRFC_12GBIT + 7) * nmhz + (nmhz >> 1) + in lpddr4_get_parameter()
1197 (LPDDR4_TRFC_6GBIT * nmhz + 999) / 1000; in lpddr4_get_parameter()
1198 tmp = (((LPDDR4_TRFC_6GBIT + 7) * nmhz + (nmhz >> 1) + in lpddr4_get_parameter()
1202 (LPDDR4_TRFC_4GBIT * nmhz + 999) / 1000; in lpddr4_get_parameter()
1203 tmp = (((LPDDR4_TRFC_4GBIT + 7) * nmhz + (nmhz >> 1) + in lpddr4_get_parameter()
1209 pdram_timing->tdqsck = ((LPDDR4_TDQSCK_MIN * nmhz + in lpddr4_get_parameter()
1210 (nmhz >> 1)) / 1000); in lpddr4_get_parameter()
1211 pdram_timing->tdqsck_max = ((LPDDR4_TDQSCK_MAX * nmhz + in lpddr4_get_parameter()
1212 (nmhz >> 1) + 999) / 1000); in lpddr4_get_parameter()
1215 tmp = ((LPDDR4_TXP * nmhz + (nmhz >> 1) + 999) / 1000); in lpddr4_get_parameter()
1217 tmp = ((LPDDR4_TCKE * nmhz + (nmhz >> 1) + 999) / 1000); in lpddr4_get_parameter()
1219 tmp = ((LPDDR4_TESCKE * nmhz + in lpddr4_get_parameter()
1220 ((nmhz * 3) / 4) + in lpddr4_get_parameter()
1223 tmp = ((LPDDR4_TSR * nmhz + 999) / 1000); in lpddr4_get_parameter()
1225 tmp = ((LPDDR4_TCMDCKE * nmhz + in lpddr4_get_parameter()
1226 ((nmhz * 3) / 4) + in lpddr4_get_parameter()
1229 pdram_timing->tcscke = ((LPDDR4_TCSCKE * nmhz + in lpddr4_get_parameter()
1230 ((nmhz * 3) / 4) + in lpddr4_get_parameter()
1232 tmp = ((LPDDR4_TCKELCS * nmhz + 999) / 1000); in lpddr4_get_parameter()
1234 pdram_timing->tcsckeh = ((LPDDR4_TCSCKEH * nmhz + in lpddr4_get_parameter()
1235 ((nmhz * 3) / 4) + in lpddr4_get_parameter()
1237 tmp = ((LPDDR4_TCKEHCS * nmhz + in lpddr4_get_parameter()
1238 (nmhz >> 1) + 999) / 1000); in lpddr4_get_parameter()
1240 tmp = ((LPDDR4_TMRWCKEL * nmhz + 999) / 1000); in lpddr4_get_parameter()
1242 tmp = ((LPDDR4_TCKELCMD * nmhz + (nmhz >> 1) + in lpddr4_get_parameter()
1245 tmp = ((LPDDR4_TCKEHCMD * nmhz + (nmhz >> 1) + in lpddr4_get_parameter()
1248 tmp = ((LPDDR4_TCKELPD * nmhz + (nmhz >> 1) + in lpddr4_get_parameter()
1251 tmp = ((LPDDR4_TCKCKEL * nmhz + (nmhz >> 1) + in lpddr4_get_parameter()
1255 tmp = ((LPDDR4_TMRD * nmhz + 999) / 1000); in lpddr4_get_parameter()
1260 pdram_timing->todton = (LPDDR4_TODTON * nmhz + (nmhz >> 1) + 999) in lpddr4_get_parameter()
1263 pdram_timing->tzqcal = (LPDDR4_TZQCAL * nmhz + 999) / 1000; in lpddr4_get_parameter()
1264 tmp = ((LPDDR4_TZQLAT * nmhz + 999) / 1000); in lpddr4_get_parameter()
1266 tmp = ((LPDDR4_TZQRESET * nmhz + 999) / 1000); in lpddr4_get_parameter()
1268 tmp = ((LPDDR4_TZQCKE * nmhz + in lpddr4_get_parameter()
1269 ((nmhz * 3) / 4) + in lpddr4_get_parameter()
1274 pdram_timing->twlo = (LPDDR4_TWLO * nmhz + 999) / 1000; in lpddr4_get_parameter()
1277 pdram_timing->tcaent = (LPDDR4_TCAENT * nmhz + 999) / 1000; in lpddr4_get_parameter()
1278 pdram_timing->tadr = (LPDDR4_TADR * nmhz + 999) / 1000; in lpddr4_get_parameter()
1279 pdram_timing->tmrz = (LPDDR4_TMRZ * nmhz + (nmhz >> 1) + 999) / 1000; in lpddr4_get_parameter()
1280 pdram_timing->tvref_long = (LPDDR4_TVREF_LONG * nmhz + 999) / 1000; in lpddr4_get_parameter()
1281 pdram_timing->tvref_short = (LPDDR4_TVREF_SHORT * nmhz + 999) / 1000; in lpddr4_get_parameter()
1283 pdram_timing->tvrcg_enable = (LPDDR4_TVRCG_ENABLE * nmhz + in lpddr4_get_parameter()
1285 pdram_timing->tvrcg_disable = (LPDDR4_TVRCG_DISABLE * nmhz + in lpddr4_get_parameter()
1288 pdram_timing->tfc_long = (LPDDR4_TFC_LONG * nmhz + 999) / 1000; in lpddr4_get_parameter()
1289 tmp = (LPDDR4_TCKFSPE * nmhz + (nmhz >> 1) + 999) / 1000; in lpddr4_get_parameter()
1291 tmp = (LPDDR4_TCKFSPX * nmhz + (nmhz >> 1) + 999) / 1000; in lpddr4_get_parameter()