Lines Matching refs:ival
210 struct ti_iodelay_reg_values *ival = &iod->reg_init_conf_values; in ti_iodelay_pinconf_set() local
223 a_delay_coarse = cfg->a_delay / ival->cdpe; in ti_iodelay_pinconf_set()
224 a_delay_fine = ((cfg->a_delay % ival->cdpe) * 10) / ival->fdpe; in ti_iodelay_pinconf_set()
230 total_delay = c_elements * ival->cdpe + f_elements * ival->fdpe; in ti_iodelay_pinconf_set()
231 c_elements = total_delay / ival->cdpe; in ti_iodelay_pinconf_set()
232 f_elements = (total_delay % ival->cdpe) / ival->fdpe; in ti_iodelay_pinconf_set()
285 struct ti_iodelay_reg_values *ival = &iod->reg_init_conf_values; in ti_iodelay_pinconf_init_dev() local
299 ival->ref_clk_period = ti_iodelay_extract(val, reg->refclk_period_mask); in ti_iodelay_pinconf_init_dev()
300 dev_dbg(dev, "refclk_period=0x%04x\n", ival->ref_clk_period); in ti_iodelay_pinconf_init_dev()
305 ival->coarse_ref_count = in ti_iodelay_pinconf_init_dev()
307 ival->coarse_delay_count = in ti_iodelay_pinconf_init_dev()
309 if (!ival->coarse_delay_count) { in ti_iodelay_pinconf_init_dev()
314 ival->cdpe = ti_iodelay_compute_dpe(ival->ref_clk_period, in ti_iodelay_pinconf_init_dev()
315 ival->coarse_ref_count, in ti_iodelay_pinconf_init_dev()
316 ival->coarse_delay_count, 88); in ti_iodelay_pinconf_init_dev()
317 if (!ival->cdpe) { in ti_iodelay_pinconf_init_dev()
319 ival->ref_clk_period, ival->coarse_ref_count, in ti_iodelay_pinconf_init_dev()
320 ival->coarse_delay_count); in ti_iodelay_pinconf_init_dev()
324 ival->coarse_ref_count, ival->coarse_delay_count, ival->cdpe); in ti_iodelay_pinconf_init_dev()
329 ival->fine_ref_count = in ti_iodelay_pinconf_init_dev()
331 ival->fine_delay_count = in ti_iodelay_pinconf_init_dev()
333 if (!ival->fine_delay_count) { in ti_iodelay_pinconf_init_dev()
338 ival->fdpe = ti_iodelay_compute_dpe(ival->ref_clk_period, in ti_iodelay_pinconf_init_dev()
339 ival->fine_ref_count, in ti_iodelay_pinconf_init_dev()
340 ival->fine_delay_count, 264); in ti_iodelay_pinconf_init_dev()
341 if (!ival->fdpe) { in ti_iodelay_pinconf_init_dev()
343 ival->ref_clk_period, ival->fine_ref_count, in ti_iodelay_pinconf_init_dev()
344 ival->fine_delay_count); in ti_iodelay_pinconf_init_dev()
348 ival->fine_ref_count, ival->fine_delay_count, ival->fdpe); in ti_iodelay_pinconf_init_dev()