Lines Matching refs:iocfg
34 const struct socfpga_sdram_io_config *iocfg; variable
509 scc_mgr_set_dqs_bus_in_delay(i, iocfg->dqs_in_reserve); in scc_mgr_zero_all()
517 scc_mgr_set_oct_out1_delay(i, iocfg->dqs_out_reserve); in scc_mgr_zero_all()
607 scc_mgr_set_dqs_out1_delay(iocfg->dqs_out_reserve); in scc_mgr_zero_group()
608 scc_mgr_set_oct_out1_delay(write_group, iocfg->dqs_out_reserve); in scc_mgr_zero_group()
694 if (new_delay > iocfg->io_out2_delay_max) { in scc_mgr_apply_group_all_out_delay_add()
698 iocfg->io_out2_delay_max, in scc_mgr_apply_group_all_out_delay_add()
699 new_delay - iocfg->io_out2_delay_max); in scc_mgr_apply_group_all_out_delay_add()
700 new_delay -= iocfg->io_out2_delay_max; in scc_mgr_apply_group_all_out_delay_add()
708 if (new_delay > iocfg->io_out2_delay_max) { in scc_mgr_apply_group_all_out_delay_add()
712 new_delay, iocfg->io_out2_delay_max, in scc_mgr_apply_group_all_out_delay_add()
713 new_delay - iocfg->io_out2_delay_max); in scc_mgr_apply_group_all_out_delay_add()
714 new_delay -= iocfg->io_out2_delay_max; in scc_mgr_apply_group_all_out_delay_add()
1559 const u32 max = delay ? iocfg->dqs_en_delay_max : in sdr_find_phase_delay()
1560 iocfg->dqs_en_phase_max; in sdr_find_phase_delay()
1604 iocfg->delay_per_opa_tap, p); in sdr_find_phase()
1608 if (*p > iocfg->dqs_en_phase_max) { in sdr_find_phase()
1632 const u32 dtaps_per_ptap = iocfg->delay_per_opa_tap / in sdr_working_phase()
1633 iocfg->delay_per_dqs_en_dchain_tap; in sdr_working_phase()
1644 *work_bgn += iocfg->delay_per_dqs_en_dchain_tap; in sdr_working_phase()
1668 *p = iocfg->dqs_en_phase_max; in sdr_backup_phase()
1673 tmp_delay = *work_bgn - iocfg->delay_per_opa_tap; in sdr_backup_phase()
1676 for (d = 0; d <= iocfg->dqs_en_delay_max && tmp_delay < *work_bgn; in sdr_backup_phase()
1687 tmp_delay += iocfg->delay_per_dqs_en_dchain_tap; in sdr_backup_phase()
1692 if (*p > iocfg->dqs_en_phase_max) { in sdr_backup_phase()
1714 *work_end += iocfg->delay_per_opa_tap; in sdr_nonworking_phase()
1715 if (*p > iocfg->dqs_en_phase_max) { in sdr_nonworking_phase()
1751 tmp_delay = (iocfg->dqs_en_phase_max + 1) * iocfg->delay_per_opa_tap; in sdr_find_window_center()
1757 tmp_delay = rounddown(work_mid, iocfg->delay_per_opa_tap); in sdr_find_window_center()
1758 if (tmp_delay > iocfg->dqs_en_phase_max * iocfg->delay_per_opa_tap) in sdr_find_window_center()
1759 tmp_delay = iocfg->dqs_en_phase_max * iocfg->delay_per_opa_tap; in sdr_find_window_center()
1760 p = tmp_delay / iocfg->delay_per_opa_tap; in sdr_find_window_center()
1765 iocfg->delay_per_dqs_en_dchain_tap); in sdr_find_window_center()
1766 if (d > iocfg->dqs_en_delay_max) in sdr_find_window_center()
1767 d = iocfg->dqs_en_delay_max; in sdr_find_window_center()
1768 tmp_delay += d * iocfg->delay_per_dqs_en_dchain_tap; in sdr_find_window_center()
1821 dtaps_per_ptap = iocfg->delay_per_opa_tap / in rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase()
1822 iocfg->delay_per_dqs_en_dchain_tap; in rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase()
1859 p = iocfg->dqs_en_phase_max; in rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase()
1865 work_end -= iocfg->delay_per_opa_tap; in rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase()
1876 iocfg->delay_per_dqs_en_dchain_tap, &d); in rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase()
1880 work_end -= iocfg->delay_per_dqs_en_dchain_tap; in rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase()
1906 p = iocfg->dqs_en_phase_max; in rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase()
2036 const u32 delay_max = write ? iocfg->io_out1_delay_max : in search_left_edge()
2037 iocfg->io_in_delay_max; in search_left_edge()
2038 const u32 dqs_max = write ? iocfg->io_out1_delay_max : in search_left_edge()
2039 iocfg->dqs_in_delay_max; in search_left_edge()
2147 const u32 delay_max = write ? iocfg->io_out1_delay_max : in search_right_edge()
2148 iocfg->io_in_delay_max; in search_right_edge()
2149 const u32 dqs_max = write ? iocfg->io_out1_delay_max : in search_right_edge()
2150 iocfg->dqs_in_delay_max; in search_right_edge()
2162 if (iocfg->shift_dqs_en_when_shift_dqs) { in search_right_edge()
2164 if (delay > iocfg->dqs_en_delay_max) in search_right_edge()
2165 delay = iocfg->dqs_en_delay_max; in search_right_edge()
2318 const s32 delay_max = write ? iocfg->io_out1_delay_max : in center_dq_windows()
2319 iocfg->io_in_delay_max; in center_dq_windows()
2411 if (iocfg->shift_dqs_en_when_shift_dqs) in rw_mgr_mem_calibrate_vfifo_center()
2412 start_dqs_en = readl(addr - iocfg->dqs_en_delay_offset); in rw_mgr_mem_calibrate_vfifo_center()
2418 left_edge[i] = iocfg->io_in_delay_max + 1; in rw_mgr_mem_calibrate_vfifo_center()
2419 right_edge[i] = iocfg->io_in_delay_max + 1; in rw_mgr_mem_calibrate_vfifo_center()
2440 if (iocfg->shift_dqs_en_when_shift_dqs) in rw_mgr_mem_calibrate_vfifo_center()
2468 if (new_dqs > iocfg->dqs_in_delay_max) in rw_mgr_mem_calibrate_vfifo_center()
2469 new_dqs = iocfg->dqs_in_delay_max; in rw_mgr_mem_calibrate_vfifo_center()
2477 if (iocfg->shift_dqs_en_when_shift_dqs) { in rw_mgr_mem_calibrate_vfifo_center()
2478 if (start_dqs_en - mid_min > iocfg->dqs_en_delay_max) in rw_mgr_mem_calibrate_vfifo_center()
2480 iocfg->dqs_en_delay_max; in rw_mgr_mem_calibrate_vfifo_center()
2489 iocfg->shift_dqs_en_when_shift_dqs ? start_dqs_en : -1, in rw_mgr_mem_calibrate_vfifo_center()
2497 if (iocfg->shift_dqs_en_when_shift_dqs) { in rw_mgr_mem_calibrate_vfifo_center()
2581 const u32 delay_step = iocfg->io_in_delay_max / in rw_mgr_mem_calibrate_dqs_enable_calibration()
2700 dtaps_per_ptap = DIV_ROUND_UP(iocfg->delay_per_opa_tap, in rw_mgr_mem_calibrate_vfifo()
2701 iocfg->delay_per_dqs_en_dchain_tap) - 1; in rw_mgr_mem_calibrate_vfifo()
2715 for (p = 0; p <= iocfg->dqdqs_out_phase_max; p++) { in rw_mgr_mem_calibrate_vfifo()
2874 const int max = iocfg->io_out1_delay_max - new_dqs; in search_window()
2905 if (*bgn_curr == iocfg->io_out1_delay_max + 1) in search_window()
2919 *bgn_curr = iocfg->io_out1_delay_max + 1; in search_window()
2920 *end_curr = iocfg->io_out1_delay_max + 1; in search_window()
2931 if (*win_best - 1 > iocfg->io_out1_delay_max - new_dqs - d) in search_window()
2959 int bgn_curr = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
2960 int end_curr = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
2961 int bgn_best = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
2962 int end_best = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
2983 left_edge[i] = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
2984 right_edge[i] = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
3028 left_edge[0] = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
3029 right_edge[0] = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
3044 bgn_curr = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
3045 end_curr = iocfg->io_out1_delay_max + 1; in rw_mgr_mem_calibrate_writes_center()
3225 if (iocfg->dll_chain_length == 6) in mem_skip_calibrate()
3256 ((125 * iocfg->dll_chain_length) / 100) - 2); in mem_skip_calibrate()
3676 writel(DIV_ROUND_UP(iocfg->delay_per_opa_tap, in initialize_tracking()
3677 iocfg->delay_per_dchain_tap) - 1, in initialize_tracking()
3721 iocfg = socfpga_get_sdram_io_config(); in sdram_calibration_full()
3756 iocfg->delay_per_opa_tap, iocfg->delay_per_dchain_tap); in sdram_calibration_full()
3758 iocfg->delay_per_dqs_en_dchain_tap, iocfg->dll_chain_length); in sdram_calibration_full()
3761 iocfg->dqs_en_phase_max, iocfg->dqdqs_out_phase_max, in sdram_calibration_full()
3762 iocfg->dqs_en_delay_max, iocfg->dqs_in_delay_max); in sdram_calibration_full()
3764 iocfg->io_in_delay_max, iocfg->io_out1_delay_max, in sdram_calibration_full()
3765 iocfg->io_out2_delay_max); in sdram_calibration_full()
3767 iocfg->dqs_in_reserve, iocfg->dqs_out_reserve); in sdram_calibration_full()