lc_common_dimm_params.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. /*
  2. * Copyright 2008-2014 Freescale Semiconductor, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * Version 2 as published by the Free Software Foundation.
  7. */
  8. #include <common.h>
  9. #include <fsl_ddr_sdram.h>
  10. #include <fsl_ddr.h>
  11. #if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR4)
  12. static unsigned int
  13. compute_cas_latency(const dimm_params_t *dimm_params,
  14. common_timing_params_t *outpdimm,
  15. unsigned int number_of_dimms)
  16. {
  17. unsigned int i;
  18. unsigned int common_caslat;
  19. unsigned int caslat_actual;
  20. unsigned int retry = 16;
  21. unsigned int tmp;
  22. const unsigned int mclk_ps = get_memory_clk_period_ps();
  23. #ifdef CONFIG_SYS_FSL_DDR3
  24. const unsigned int taamax = 20000;
  25. #else
  26. const unsigned int taamax = 18000;
  27. #endif
  28. /* compute the common CAS latency supported between slots */
  29. tmp = dimm_params[0].caslat_x;
  30. for (i = 1; i < number_of_dimms; i++) {
  31. if (dimm_params[i].n_ranks)
  32. tmp &= dimm_params[i].caslat_x;
  33. }
  34. common_caslat = tmp;
  35. /* validate if the memory clk is in the range of dimms */
  36. if (mclk_ps < outpdimm->tckmin_x_ps) {
  37. printf("DDR clock (MCLK cycle %u ps) is faster than "
  38. "the slowest DIMM(s) (tCKmin %u ps) can support.\n",
  39. mclk_ps, outpdimm->tckmin_x_ps);
  40. }
  41. #ifdef CONFIG_SYS_FSL_DDR4
  42. if (mclk_ps > outpdimm->tckmax_ps) {
  43. printf("DDR clock (MCLK cycle %u ps) is slower than DIMM(s) (tCKmax %u ps) can support.\n",
  44. mclk_ps, outpdimm->tckmax_ps);
  45. }
  46. #endif
  47. /* determine the acutal cas latency */
  48. caslat_actual = (outpdimm->taamin_ps + mclk_ps - 1) / mclk_ps;
  49. /* check if the dimms support the CAS latency */
  50. while (!(common_caslat & (1 << caslat_actual)) && retry > 0) {
  51. caslat_actual++;
  52. retry--;
  53. }
  54. /* once the caculation of caslat_actual is completed
  55. * we must verify that this CAS latency value does not
  56. * exceed tAAmax, which is 20 ns for all DDR3 speed grades,
  57. * 18ns for all DDR4 speed grades.
  58. */
  59. if (caslat_actual * mclk_ps > taamax) {
  60. printf("The choosen cas latency %d is too large\n",
  61. caslat_actual);
  62. }
  63. outpdimm->lowest_common_spd_caslat = caslat_actual;
  64. debug("lowest_common_spd_caslat is 0x%x\n", caslat_actual);
  65. return 0;
  66. }
  67. #else /* for DDR1 and DDR2 */
  68. static unsigned int
  69. compute_cas_latency(const dimm_params_t *dimm_params,
  70. common_timing_params_t *outpdimm,
  71. unsigned int number_of_dimms)
  72. {
  73. int i;
  74. const unsigned int mclk_ps = get_memory_clk_period_ps();
  75. unsigned int lowest_good_caslat;
  76. unsigned int not_ok;
  77. unsigned int temp1, temp2;
  78. debug("using mclk_ps = %u\n", mclk_ps);
  79. if (mclk_ps > outpdimm->tckmax_ps) {
  80. printf("Warning: DDR clock (%u ps) is slower than DIMM(s) (tCKmax %u ps)\n",
  81. mclk_ps, outpdimm->tckmax_ps);
  82. }
  83. /*
  84. * Compute a CAS latency suitable for all DIMMs
  85. *
  86. * Strategy for SPD-defined latencies: compute only
  87. * CAS latency defined by all DIMMs.
  88. */
  89. /*
  90. * Step 1: find CAS latency common to all DIMMs using bitwise
  91. * operation.
  92. */
  93. temp1 = 0xFF;
  94. for (i = 0; i < number_of_dimms; i++) {
  95. if (dimm_params[i].n_ranks) {
  96. temp2 = 0;
  97. temp2 |= 1 << dimm_params[i].caslat_x;
  98. temp2 |= 1 << dimm_params[i].caslat_x_minus_1;
  99. temp2 |= 1 << dimm_params[i].caslat_x_minus_2;
  100. /*
  101. * If there was no entry for X-2 (X-1) in
  102. * the SPD, then caslat_x_minus_2
  103. * (caslat_x_minus_1) contains either 255 or
  104. * 0xFFFFFFFF because that's what the glorious
  105. * __ilog2 function returns for an input of 0.
  106. * On 32-bit PowerPC, left shift counts with bit
  107. * 26 set (that the value of 255 or 0xFFFFFFFF
  108. * will have), cause the destination register to
  109. * be 0. That is why this works.
  110. */
  111. temp1 &= temp2;
  112. }
  113. }
  114. /*
  115. * Step 2: check each common CAS latency against tCK of each
  116. * DIMM's SPD.
  117. */
  118. lowest_good_caslat = 0;
  119. temp2 = 0;
  120. while (temp1) {
  121. not_ok = 0;
  122. temp2 = __ilog2(temp1);
  123. debug("checking common caslat = %u\n", temp2);
  124. /* Check if this CAS latency will work on all DIMMs at tCK. */
  125. for (i = 0; i < number_of_dimms; i++) {
  126. if (!dimm_params[i].n_ranks)
  127. continue;
  128. if (dimm_params[i].caslat_x == temp2) {
  129. if (mclk_ps >= dimm_params[i].tckmin_x_ps) {
  130. debug("CL = %u ok on DIMM %u at tCK=%u ps with tCKmin_X_ps of %u\n",
  131. temp2, i, mclk_ps,
  132. dimm_params[i].tckmin_x_ps);
  133. continue;
  134. } else {
  135. not_ok++;
  136. }
  137. }
  138. if (dimm_params[i].caslat_x_minus_1 == temp2) {
  139. unsigned int tckmin_x_minus_1_ps
  140. = dimm_params[i].tckmin_x_minus_1_ps;
  141. if (mclk_ps >= tckmin_x_minus_1_ps) {
  142. debug("CL = %u ok on DIMM %u at tCK=%u ps with tckmin_x_minus_1_ps of %u\n",
  143. temp2, i, mclk_ps,
  144. tckmin_x_minus_1_ps);
  145. continue;
  146. } else {
  147. not_ok++;
  148. }
  149. }
  150. if (dimm_params[i].caslat_x_minus_2 == temp2) {
  151. unsigned int tckmin_x_minus_2_ps
  152. = dimm_params[i].tckmin_x_minus_2_ps;
  153. if (mclk_ps >= tckmin_x_minus_2_ps) {
  154. debug("CL = %u ok on DIMM %u at tCK=%u ps with tckmin_x_minus_2_ps of %u\n",
  155. temp2, i, mclk_ps,
  156. tckmin_x_minus_2_ps);
  157. continue;
  158. } else {
  159. not_ok++;
  160. }
  161. }
  162. }
  163. if (!not_ok)
  164. lowest_good_caslat = temp2;
  165. temp1 &= ~(1 << temp2);
  166. }
  167. debug("lowest common SPD-defined CAS latency = %u\n",
  168. lowest_good_caslat);
  169. outpdimm->lowest_common_spd_caslat = lowest_good_caslat;
  170. /*
  171. * Compute a common 'de-rated' CAS latency.
  172. *
  173. * The strategy here is to find the *highest* dereated cas latency
  174. * with the assumption that all of the DIMMs will support a dereated
  175. * CAS latency higher than or equal to their lowest dereated value.
  176. */
  177. temp1 = 0;
  178. for (i = 0; i < number_of_dimms; i++)
  179. temp1 = max(temp1, dimm_params[i].caslat_lowest_derated);
  180. outpdimm->highest_common_derated_caslat = temp1;
  181. debug("highest common dereated CAS latency = %u\n", temp1);
  182. return 0;
  183. }
  184. #endif
  185. /*
  186. * compute_lowest_common_dimm_parameters()
  187. *
  188. * Determine the worst-case DIMM timing parameters from the set of DIMMs
  189. * whose parameters have been computed into the array pointed to
  190. * by dimm_params.
  191. */
  192. unsigned int
  193. compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
  194. common_timing_params_t *outpdimm,
  195. const unsigned int number_of_dimms)
  196. {
  197. unsigned int i, j;
  198. unsigned int tckmin_x_ps = 0;
  199. unsigned int tckmax_ps = 0xFFFFFFFF;
  200. unsigned int trcd_ps = 0;
  201. unsigned int trp_ps = 0;
  202. unsigned int tras_ps = 0;
  203. #if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR4)
  204. unsigned int taamin_ps = 0;
  205. #endif
  206. #ifdef CONFIG_SYS_FSL_DDR4
  207. unsigned int twr_ps = 15000;
  208. unsigned int trfc1_ps = 0;
  209. unsigned int trfc2_ps = 0;
  210. unsigned int trfc4_ps = 0;
  211. unsigned int trrds_ps = 0;
  212. unsigned int trrdl_ps = 0;
  213. unsigned int tccdl_ps = 0;
  214. #else
  215. unsigned int twr_ps = 0;
  216. unsigned int twtr_ps = 0;
  217. unsigned int trfc_ps = 0;
  218. unsigned int trrd_ps = 0;
  219. unsigned int trtp_ps = 0;
  220. #endif
  221. unsigned int trc_ps = 0;
  222. unsigned int refresh_rate_ps = 0;
  223. unsigned int extended_op_srt = 1;
  224. #if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2)
  225. unsigned int tis_ps = 0;
  226. unsigned int tih_ps = 0;
  227. unsigned int tds_ps = 0;
  228. unsigned int tdh_ps = 0;
  229. unsigned int tdqsq_max_ps = 0;
  230. unsigned int tqhs_ps = 0;
  231. #endif
  232. unsigned int temp1, temp2;
  233. unsigned int additive_latency = 0;
  234. temp1 = 0;
  235. for (i = 0; i < number_of_dimms; i++) {
  236. /*
  237. * If there are no ranks on this DIMM,
  238. * it probably doesn't exist, so skip it.
  239. */
  240. if (dimm_params[i].n_ranks == 0) {
  241. temp1++;
  242. continue;
  243. }
  244. if (dimm_params[i].n_ranks == 4 && i != 0) {
  245. printf("Found Quad-rank DIMM in wrong bank, ignored."
  246. " Software may not run as expected.\n");
  247. temp1++;
  248. continue;
  249. }
  250. /*
  251. * check if quad-rank DIMM is plugged if
  252. * CONFIG_CHIP_SELECT_QUAD_CAPABLE is not defined
  253. * Only the board with proper design is capable
  254. */
  255. #ifndef CONFIG_FSL_DDR_FIRST_SLOT_QUAD_CAPABLE
  256. if (dimm_params[i].n_ranks == 4 && \
  257. CONFIG_CHIP_SELECTS_PER_CTRL/CONFIG_DIMM_SLOTS_PER_CTLR < 4) {
  258. printf("Found Quad-rank DIMM, not able to support.");
  259. temp1++;
  260. continue;
  261. }
  262. #endif
  263. /*
  264. * Find minimum tckmax_ps to find fastest slow speed,
  265. * i.e., this is the slowest the whole system can go.
  266. */
  267. tckmax_ps = min(tckmax_ps, dimm_params[i].tckmax_ps);
  268. #if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR4)
  269. taamin_ps = max(taamin_ps, dimm_params[i].taa_ps);
  270. #endif
  271. tckmin_x_ps = max(tckmin_x_ps, dimm_params[i].tckmin_x_ps);
  272. trcd_ps = max(trcd_ps, dimm_params[i].trcd_ps);
  273. trp_ps = max(trp_ps, dimm_params[i].trp_ps);
  274. tras_ps = max(tras_ps, dimm_params[i].tras_ps);
  275. #ifdef CONFIG_SYS_FSL_DDR4
  276. trfc1_ps = max(trfc1_ps, dimm_params[i].trfc1_ps);
  277. trfc2_ps = max(trfc2_ps, dimm_params[i].trfc2_ps);
  278. trfc4_ps = max(trfc4_ps, dimm_params[i].trfc4_ps);
  279. trrds_ps = max(trrds_ps, dimm_params[i].trrds_ps);
  280. trrdl_ps = max(trrdl_ps, dimm_params[i].trrdl_ps);
  281. tccdl_ps = max(tccdl_ps, dimm_params[i].tccdl_ps);
  282. #else
  283. twr_ps = max(twr_ps, dimm_params[i].twr_ps);
  284. twtr_ps = max(twtr_ps, dimm_params[i].twtr_ps);
  285. trfc_ps = max(trfc_ps, dimm_params[i].trfc_ps);
  286. trrd_ps = max(trrd_ps, dimm_params[i].trrd_ps);
  287. trtp_ps = max(trtp_ps, dimm_params[i].trtp_ps);
  288. #endif
  289. trc_ps = max(trc_ps, dimm_params[i].trc_ps);
  290. #if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2)
  291. tis_ps = max(tis_ps, dimm_params[i].tis_ps);
  292. tih_ps = max(tih_ps, dimm_params[i].tih_ps);
  293. tds_ps = max(tds_ps, dimm_params[i].tds_ps);
  294. tdh_ps = max(tdh_ps, dimm_params[i].tdh_ps);
  295. tqhs_ps = max(tqhs_ps, dimm_params[i].tqhs_ps);
  296. /*
  297. * Find maximum tdqsq_max_ps to find slowest.
  298. *
  299. * FIXME: is finding the slowest value the correct
  300. * strategy for this parameter?
  301. */
  302. tdqsq_max_ps = max(tdqsq_max_ps, dimm_params[i].tdqsq_max_ps);
  303. #endif
  304. refresh_rate_ps = max(refresh_rate_ps,
  305. dimm_params[i].refresh_rate_ps);
  306. /* extended_op_srt is either 0 or 1, 0 having priority */
  307. extended_op_srt = min(extended_op_srt,
  308. dimm_params[i].extended_op_srt);
  309. }
  310. outpdimm->ndimms_present = number_of_dimms - temp1;
  311. if (temp1 == number_of_dimms) {
  312. debug("no dimms this memory controller\n");
  313. return 0;
  314. }
  315. outpdimm->tckmin_x_ps = tckmin_x_ps;
  316. outpdimm->tckmax_ps = tckmax_ps;
  317. #if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR4)
  318. outpdimm->taamin_ps = taamin_ps;
  319. #endif
  320. outpdimm->trcd_ps = trcd_ps;
  321. outpdimm->trp_ps = trp_ps;
  322. outpdimm->tras_ps = tras_ps;
  323. #ifdef CONFIG_SYS_FSL_DDR4
  324. outpdimm->trfc1_ps = trfc1_ps;
  325. outpdimm->trfc2_ps = trfc2_ps;
  326. outpdimm->trfc4_ps = trfc4_ps;
  327. outpdimm->trrds_ps = trrds_ps;
  328. outpdimm->trrdl_ps = trrdl_ps;
  329. outpdimm->tccdl_ps = tccdl_ps;
  330. #else
  331. outpdimm->twtr_ps = twtr_ps;
  332. outpdimm->trfc_ps = trfc_ps;
  333. outpdimm->trrd_ps = trrd_ps;
  334. outpdimm->trtp_ps = trtp_ps;
  335. #endif
  336. outpdimm->twr_ps = twr_ps;
  337. outpdimm->trc_ps = trc_ps;
  338. outpdimm->refresh_rate_ps = refresh_rate_ps;
  339. outpdimm->extended_op_srt = extended_op_srt;
  340. #if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2)
  341. outpdimm->tis_ps = tis_ps;
  342. outpdimm->tih_ps = tih_ps;
  343. outpdimm->tds_ps = tds_ps;
  344. outpdimm->tdh_ps = tdh_ps;
  345. outpdimm->tdqsq_max_ps = tdqsq_max_ps;
  346. outpdimm->tqhs_ps = tqhs_ps;
  347. #endif
  348. /* Determine common burst length for all DIMMs. */
  349. temp1 = 0xff;
  350. for (i = 0; i < number_of_dimms; i++) {
  351. if (dimm_params[i].n_ranks) {
  352. temp1 &= dimm_params[i].burst_lengths_bitmask;
  353. }
  354. }
  355. outpdimm->all_dimms_burst_lengths_bitmask = temp1;
  356. /* Determine if all DIMMs registered buffered. */
  357. temp1 = temp2 = 0;
  358. for (i = 0; i < number_of_dimms; i++) {
  359. if (dimm_params[i].n_ranks) {
  360. if (dimm_params[i].registered_dimm) {
  361. temp1 = 1;
  362. #ifndef CONFIG_SPL_BUILD
  363. printf("Detected RDIMM %s\n",
  364. dimm_params[i].mpart);
  365. #endif
  366. } else {
  367. temp2 = 1;
  368. #ifndef CONFIG_SPL_BUILD
  369. printf("Detected UDIMM %s\n",
  370. dimm_params[i].mpart);
  371. #endif
  372. }
  373. }
  374. }
  375. outpdimm->all_dimms_registered = 0;
  376. outpdimm->all_dimms_unbuffered = 0;
  377. if (temp1 && !temp2) {
  378. outpdimm->all_dimms_registered = 1;
  379. } else if (!temp1 && temp2) {
  380. outpdimm->all_dimms_unbuffered = 1;
  381. } else {
  382. printf("ERROR: Mix of registered buffered and unbuffered "
  383. "DIMMs detected!\n");
  384. }
  385. temp1 = 0;
  386. if (outpdimm->all_dimms_registered)
  387. for (j = 0; j < 16; j++) {
  388. outpdimm->rcw[j] = dimm_params[0].rcw[j];
  389. for (i = 1; i < number_of_dimms; i++) {
  390. if (!dimm_params[i].n_ranks)
  391. continue;
  392. if (dimm_params[i].rcw[j] != dimm_params[0].rcw[j]) {
  393. temp1 = 1;
  394. break;
  395. }
  396. }
  397. }
  398. if (temp1 != 0)
  399. printf("ERROR: Mix different RDIMM detected!\n");
  400. /* calculate cas latency for all DDR types */
  401. if (compute_cas_latency(dimm_params, outpdimm, number_of_dimms))
  402. return 1;
  403. /* Determine if all DIMMs ECC capable. */
  404. temp1 = 1;
  405. for (i = 0; i < number_of_dimms; i++) {
  406. if (dimm_params[i].n_ranks &&
  407. !(dimm_params[i].edc_config & EDC_ECC)) {
  408. temp1 = 0;
  409. break;
  410. }
  411. }
  412. if (temp1) {
  413. debug("all DIMMs ECC capable\n");
  414. } else {
  415. debug("Warning: not all DIMMs ECC capable, cant enable ECC\n");
  416. }
  417. outpdimm->all_dimms_ecc_capable = temp1;
  418. /*
  419. * Compute additive latency.
  420. *
  421. * For DDR1, additive latency should be 0.
  422. *
  423. * For DDR2, with ODT enabled, use "a value" less than ACTTORW,
  424. * which comes from Trcd, and also note that:
  425. * add_lat + caslat must be >= 4
  426. *
  427. * For DDR3, we use the AL=0
  428. *
  429. * When to use additive latency for DDR2:
  430. *
  431. * I. Because you are using CL=3 and need to do ODT on writes and
  432. * want functionality.
  433. * 1. Are you going to use ODT? (Does your board not have
  434. * additional termination circuitry for DQ, DQS, DQS_,
  435. * DM, RDQS, RDQS_ for x4/x8 configs?)
  436. * 2. If so, is your lowest supported CL going to be 3?
  437. * 3. If so, then you must set AL=1 because
  438. *
  439. * WL >= 3 for ODT on writes
  440. * RL = AL + CL
  441. * WL = RL - 1
  442. * ->
  443. * WL = AL + CL - 1
  444. * AL + CL - 1 >= 3
  445. * AL + CL >= 4
  446. * QED
  447. *
  448. * RL >= 3 for ODT on reads
  449. * RL = AL + CL
  450. *
  451. * Since CL aren't usually less than 2, AL=0 is a minimum,
  452. * so the WL-derived AL should be the -- FIXME?
  453. *
  454. * II. Because you are using auto-precharge globally and want to
  455. * use additive latency (posted CAS) to get more bandwidth.
  456. * 1. Are you going to use auto-precharge mode globally?
  457. *
  458. * Use addtivie latency and compute AL to be 1 cycle less than
  459. * tRCD, i.e. the READ or WRITE command is in the cycle
  460. * immediately following the ACTIVATE command..
  461. *
  462. * III. Because you feel like it or want to do some sort of
  463. * degraded-performance experiment.
  464. * 1. Do you just want to use additive latency because you feel
  465. * like it?
  466. *
  467. * Validation: AL is less than tRCD, and within the other
  468. * read-to-precharge constraints.
  469. */
  470. additive_latency = 0;
  471. #if defined(CONFIG_SYS_FSL_DDR2)
  472. if ((outpdimm->lowest_common_spd_caslat < 4) &&
  473. (picos_to_mclk(trcd_ps) > outpdimm->lowest_common_spd_caslat)) {
  474. additive_latency = picos_to_mclk(trcd_ps) -
  475. outpdimm->lowest_common_spd_caslat;
  476. if (mclk_to_picos(additive_latency) > trcd_ps) {
  477. additive_latency = picos_to_mclk(trcd_ps);
  478. debug("setting additive_latency to %u because it was "
  479. " greater than tRCD_ps\n", additive_latency);
  480. }
  481. }
  482. #endif
  483. /*
  484. * Validate additive latency
  485. *
  486. * AL <= tRCD(min)
  487. */
  488. if (mclk_to_picos(additive_latency) > trcd_ps) {
  489. printf("Error: invalid additive latency exceeds tRCD(min).\n");
  490. return 1;
  491. }
  492. /*
  493. * RL = CL + AL; RL >= 3 for ODT_RD_CFG to be enabled
  494. * WL = RL - 1; WL >= 3 for ODT_WL_CFG to be enabled
  495. * ADD_LAT (the register) must be set to a value less
  496. * than ACTTORW if WL = 1, then AL must be set to 1
  497. * RD_TO_PRE (the register) must be set to a minimum
  498. * tRTP + AL if AL is nonzero
  499. */
  500. /*
  501. * Additive latency will be applied only if the memctl option to
  502. * use it.
  503. */
  504. outpdimm->additive_latency = additive_latency;
  505. debug("tCKmin_ps = %u\n", outpdimm->tckmin_x_ps);
  506. debug("trcd_ps = %u\n", outpdimm->trcd_ps);
  507. debug("trp_ps = %u\n", outpdimm->trp_ps);
  508. debug("tras_ps = %u\n", outpdimm->tras_ps);
  509. #ifdef CONFIG_SYS_FSL_DDR4
  510. debug("trfc1_ps = %u\n", trfc1_ps);
  511. debug("trfc2_ps = %u\n", trfc2_ps);
  512. debug("trfc4_ps = %u\n", trfc4_ps);
  513. debug("trrds_ps = %u\n", trrds_ps);
  514. debug("trrdl_ps = %u\n", trrdl_ps);
  515. debug("tccdl_ps = %u\n", tccdl_ps);
  516. #else
  517. debug("twtr_ps = %u\n", outpdimm->twtr_ps);
  518. debug("trfc_ps = %u\n", outpdimm->trfc_ps);
  519. debug("trrd_ps = %u\n", outpdimm->trrd_ps);
  520. #endif
  521. debug("twr_ps = %u\n", outpdimm->twr_ps);
  522. debug("trc_ps = %u\n", outpdimm->trc_ps);
  523. return 0;
  524. }