• Home
  • Raw
  • Download

Lines Matching refs:rk

256 	uint8_t rk;	/* rank counter */  in ddrphy_init()  local
841 for (rk = 0; rk < NUM_RANKS; rk++) { in ddrphy_init()
842 if (mrc_params->rank_enables & (1 << rk)) { in ddrphy_init()
843 set_wclk(ch, rk, ddr_wclk[PLATFORM_ID]); in ddrphy_init()
845 set_wctl(ch, rk, ddr_wctl[PLATFORM_ID]); in ddrphy_init()
847 set_wctl(ch, rk, ddr_wclk[PLATFORM_ID] + HALF_CLK); in ddrphy_init()
1353 uint8_t ch, rk, bl; in restore_timings() local
1357 for (rk = 0; rk < NUM_RANKS; rk++) { in restore_timings()
1359 set_rcvn(ch, rk, bl, mt->rcvn[ch][rk][bl]); in restore_timings()
1360 set_rdqs(ch, rk, bl, mt->rdqs[ch][rk][bl]); in restore_timings()
1361 set_wdqs(ch, rk, bl, mt->wdqs[ch][rk][bl]); in restore_timings()
1362 set_wdq(ch, rk, bl, mt->wdq[ch][rk][bl]); in restore_timings()
1363 if (rk == 0) { in restore_timings()
1368 set_wctl(ch, rk, mt->wctl[ch][rk]); in restore_timings()
1382 uint8_t ch, rk, bl; in default_timings() local
1385 for (rk = 0; rk < NUM_RANKS; rk++) { in default_timings()
1387 set_rdqs(ch, rk, bl, 24); in default_timings()
1388 if (rk == 0) { in default_timings()
1405 uint8_t rk; /* rank counter */ in rcvn_cal() local
1448 for (rk = 0; rk < NUM_RANKS; rk++) { in rcvn_cal()
1449 if (mrc_params->rank_enables & (1 << rk)) { in rcvn_cal()
1454 mrc_post_code(0x05, 0x10 + ((ch << 4) | rk)); in rcvn_cal()
1459 set_rcvn(ch, rk, bl, ddr_rcvn[PLATFORM_ID]); in rcvn_cal()
1474 set_rcvn(ch, rk, bl, delay[bl]); in rcvn_cal()
1478 find_rising_edge(mrc_params, delay, ch, rk, true); in rcvn_cal()
1483 set_rcvn(ch, rk, bl, delay[bl]); in rcvn_cal()
1487 temp = sample_dqs(mrc_params, ch, rk, true); in rcvn_cal()
1492 set_rcvn(ch, rk, bl, delay[bl]); in rcvn_cal()
1495 training_message(ch, rk, bl); in rcvn_cal()
1511 set_rcvn(ch, rk, bl, final_delay[ch][bl] / num_ranks_enabled); in rcvn_cal()
1517 set_rcvn(ch, rk, bl, delay[bl]); in rcvn_cal()
1552 uint8_t rk; /* rank counter */ in wr_level() local
1594 for (rk = 0; rk < NUM_RANKS; rk++) { in wr_level()
1595 if (mrc_params->rank_enables & (1 << rk)) { in wr_level()
1600 mrc_post_code(0x06, 0x10 + ((ch << 4) | rk)); in wr_level()
1604 set_wdqs(ch, rk, bl, ddr_wdqs[PLATFORM_ID]); in wr_level()
1605 set_wdq(ch, rk, bl, ddr_wdqs[PLATFORM_ID] - QRTR_CLK); in wr_level()
1612 dram_init_command(DCMD_PREA(rk)); in wr_level()
1618 dram_init_command(DCMD_MRS1(rk, 0x82)); in wr_level()
1652 delay[bl] = get_wclk(ch, rk); in wr_level()
1654 set_wdqs(ch, rk, bl, delay[bl]); in wr_level()
1658 find_rising_edge(mrc_params, delay, ch, rk, false); in wr_level()
1680 dram_init_command(DCMD_MRS1(rk, mrc_params->mrs1)); in wr_level()
1686 dram_init_command(DCMD_PREA(rk)); in wr_level()
1688 mrc_post_code(0x06, 0x30 + ((ch << 4) | rk)); in wr_level()
1700 delay[bl] = get_wdqs(ch, rk, bl) + FULL_CLK; in wr_level()
1701 set_wdqs(ch, rk, bl, delay[bl]); in wr_level()
1706 set_wdq(ch, rk, bl, (delay[bl] - QRTR_CLK)); in wr_level()
1710 address = get_addr(ch, rk); in wr_level()
1725 set_wdqs(ch, rk, bl, delay[bl]); in wr_level()
1727 set_wdq(ch, rk, bl, delay[bl] - QRTR_CLK); in wr_level()
1738 set_wdqs(ch, rk, bl, final_delay[ch][bl] / num_ranks_enabled); in wr_level()
1740 set_wdq(ch, rk, bl, final_delay[ch][bl] / num_ranks_enabled - QRTR_CLK); in wr_level()
1787 uint8_t rk; /* rank counter */ in rd_train() local
1821 for (rk = 0; rk < NUM_RANKS; rk++) { in rd_train()
1822 if (mrc_params->rank_enables & (1 << rk)) { in rd_train()
1826 set_rdqs(ch, rk, bl, ddr_rdqs[PLATFORM_ID]); in rd_train()
1836 for (rk = 0; rk < NUM_RANKS; rk++) { in rd_train()
1837 if (mrc_params->rank_enables & (1 << rk)) { in rd_train()
1842 x_coordinate[L][B][ch][rk][bl] = RDQS_MIN; in rd_train()
1843 x_coordinate[R][B][ch][rk][bl] = RDQS_MAX; in rd_train()
1844 x_coordinate[L][T][ch][rk][bl] = RDQS_MIN; in rd_train()
1845 x_coordinate[R][T][ch][rk][bl] = RDQS_MAX; in rd_train()
1874 for (rk = 0; rk < NUM_RANKS; rk++) { in rd_train()
1876 (0x1 << rk)) { in rd_train()
1881 set_rdqs(ch, rk, bl, in rd_train()
1882 x_coordinate[side_x][side_y][ch][rk][bl]); in rd_train()
1888 address = get_addr(ch, rk); in rd_train()
1906 x_coordinate[L][side_y][ch][rk][bl] += RDQS_STEP; in rd_train()
1908 x_coordinate[R][side_y][ch][rk][bl] -= RDQS_STEP; in rd_train()
1911 if ((x_coordinate[L][side_y][ch][rk][bl] > (RDQS_MAX - MIN_RDQS_EYE)) || in rd_train()
1912 (x_coordinate[R][side_y][ch][rk][bl] < (RDQS_MIN + MIN_RDQS_EYE)) || in rd_train()
1913 (x_coordinate[L][side_y][ch][rk][bl] == in rd_train()
1914 x_coordinate[R][side_y][ch][rk][bl])) { in rd_train()
1929 training_message(ch, rk, bl); in rd_train()
1935 x_coordinate[side_x][side_y][ch][rk][bl] = in rd_train()
1941 set_rdqs(ch, rk, bl, x_coordinate[side_x][side_y][ch][rk][bl]); in rd_train()
1958 for (rk = 0; rk < NUM_RANKS; rk++) { in rd_train()
1959 if (mrc_params->rank_enables & (1 << rk)) { in rd_train()
1967 rk, bl, in rd_train()
1968 x_coordinate[L][T][ch][rk][bl], in rd_train()
1969 x_coordinate[R][T][ch][rk][bl], in rd_train()
1970 x_coordinate[L][B][ch][rk][bl], in rd_train()
1971 x_coordinate[R][B][ch][rk][bl]); in rd_train()
1974 temp1 = (x_coordinate[R][T][ch][rk][bl] + x_coordinate[L][T][ch][rk][bl]) / 2; in rd_train()
1976 temp2 = (x_coordinate[R][B][ch][rk][bl] + x_coordinate[L][B][ch][rk][bl]) / 2; in rd_train()
1978 x_center[ch][rk][bl] = (uint8_t) ((temp1 + temp2) / 2); in rd_train()
2010 for (rk = 0; rk < NUM_RANKS; rk++) { in rd_train()
2011 if (mrc_params->rank_enables & (1 << rk)) { in rd_train()
2014 set_rdqs(ch, rk, bl, x_center[ch][rk][bl] - (MIN_RDQS_EYE / 2)); in rd_train()
2016 set_rdqs(ch, rk, bl, x_center[ch][rk][bl] + (MIN_RDQS_EYE / 2)); in rd_train()
2045 for (rk = 0; rk < NUM_RANKS; rk++) { in rd_train()
2046 if (mrc_params->rank_enables & (1 << rk)) { in rd_train()
2054 final_delay[ch][bl] += x_center[ch][rk][bl]; in rd_train()
2055 set_rdqs(ch, rk, bl, final_delay[ch][bl] / num_ranks_enabled); in rd_train()
2057 set_rdqs(ch, rk, bl, x_center[ch][rk][bl]); in rd_train()
2085 uint8_t rk; /* rank counter */ in wr_train() local
2113 for (rk = 0; rk < NUM_RANKS; rk++) { in wr_train()
2114 if (mrc_params->rank_enables & (1 << rk)) { in wr_train()
2118 set_wdq(ch, rk, bl, ddr_wdq[PLATFORM_ID]); in wr_train()
2128 for (rk = 0; rk < NUM_RANKS; rk++) { in wr_train()
2129 if (mrc_params->rank_enables & (1 << rk)) { in wr_train()
2138 temp = get_wdqs(ch, rk, bl) - QRTR_CLK; in wr_train()
2139 delay[L][ch][rk][bl] = temp - QRTR_CLK; in wr_train()
2140 delay[R][ch][rk][bl] = temp + QRTR_CLK; in wr_train()
2166 for (rk = 0; rk < NUM_RANKS; rk++) { in wr_train()
2168 (1 << rk)) { in wr_train()
2172 set_wdq(ch, rk, bl, delay[side][ch][rk][bl]); in wr_train()
2182 for (rk = 0; rk < NUM_RANKS; rk++) { in wr_train()
2184 (1 << rk)) { in wr_train()
2186 address = get_addr(ch, rk); in wr_train()
2202 delay[L][ch][rk][bl] += WDQ_STEP; in wr_train()
2204 delay[R][ch][rk][bl] -= WDQ_STEP; in wr_train()
2207 if (delay[L][ch][rk][bl] != delay[R][ch][rk][bl]) { in wr_train()
2212 set_wdq(ch, rk, bl, in wr_train()
2213 delay[side][ch][rk][bl]); in wr_train()
2219 training_message(ch, rk, bl); in wr_train()
2236 for (rk = 0; rk < NUM_RANKS; rk++) { in wr_train()
2237 if (mrc_params->rank_enables & (1 << rk)) { in wr_train()
2245 rk, bl, in wr_train()
2246 delay[L][ch][rk][bl], in wr_train()
2247 delay[R][ch][rk][bl]); in wr_train()
2249 temp = (delay[R][ch][rk][bl] + delay[L][ch][rk][bl]) / 2; in wr_train()
2253 set_wdq(ch, rk, bl, in wr_train()
2256 set_wdq(ch, rk, bl, temp); in wr_train()
2276 uint8_t ch, rk, bl; in store_timings() local
2280 for (rk = 0; rk < NUM_RANKS; rk++) { in store_timings()
2282 mt->rcvn[ch][rk][bl] = get_rcvn(ch, rk, bl); in store_timings()
2283 mt->rdqs[ch][rk][bl] = get_rdqs(ch, rk, bl); in store_timings()
2284 mt->wdqs[ch][rk][bl] = get_wdqs(ch, rk, bl); in store_timings()
2285 mt->wdq[ch][rk][bl] = get_wdq(ch, rk, bl); in store_timings()
2287 if (rk == 0) in store_timings()
2291 mt->wctl[ch][rk] = get_wctl(ch, rk); in store_timings()