Lines Matching refs:div

384 static inline unsigned long round_to_extif_ticks(unsigned long ps, int div)  in round_to_extif_ticks()  argument
386 int bus_tick = extif_clk_period * div; in round_to_extif_ticks()
390 static int calc_reg_timing(struct rfbi_timings *t, int div) in calc_reg_timing() argument
392 t->clk_div = div; in calc_reg_timing()
394 t->cs_on_time = round_to_extif_ticks(t->cs_on_time, div); in calc_reg_timing()
396 t->we_on_time = round_to_extif_ticks(t->we_on_time, div); in calc_reg_timing()
397 t->we_off_time = round_to_extif_ticks(t->we_off_time, div); in calc_reg_timing()
398 t->we_cycle_time = round_to_extif_ticks(t->we_cycle_time, div); in calc_reg_timing()
400 t->re_on_time = round_to_extif_ticks(t->re_on_time, div); in calc_reg_timing()
401 t->re_off_time = round_to_extif_ticks(t->re_off_time, div); in calc_reg_timing()
402 t->re_cycle_time = round_to_extif_ticks(t->re_cycle_time, div); in calc_reg_timing()
404 t->access_time = round_to_extif_ticks(t->access_time, div); in calc_reg_timing()
405 t->cs_off_time = round_to_extif_ticks(t->cs_off_time, div); in calc_reg_timing()
406 t->cs_pulse_width = round_to_extif_ticks(t->cs_pulse_width, div); in calc_reg_timing()
422 int div; in calc_extif_timings() local
425 for (div = 1; div <= max_clk_div; div++) { in calc_extif_timings()
426 if (calc_reg_timing(t, div) == 0) in calc_extif_timings()
430 if (div <= max_clk_div) in calc_extif_timings()
462 static int ps_to_rfbi_ticks(int time, int div) in ps_to_rfbi_ticks() argument
468 tick_ps = 1000000000 / (rfbi.l4_khz) * div; in ps_to_rfbi_ticks()
539 int div = t->clk_div; in rfbi_convert_timings() local
541 if (div <= 0 || div > 2) in rfbi_convert_timings()
548 weon = ps_to_rfbi_ticks(t->we_on_time, div); in rfbi_convert_timings()
549 weoff = ps_to_rfbi_ticks(t->we_off_time, div); in rfbi_convert_timings()
557 reon = ps_to_rfbi_ticks(t->re_on_time, div); in rfbi_convert_timings()
558 reoff = ps_to_rfbi_ticks(t->re_off_time, div); in rfbi_convert_timings()
566 cson = ps_to_rfbi_ticks(t->cs_on_time, div); in rfbi_convert_timings()
567 csoff = ps_to_rfbi_ticks(t->cs_off_time, div); in rfbi_convert_timings()
586 actim = ps_to_rfbi_ticks(t->access_time, div); in rfbi_convert_timings()
592 wecyc = ps_to_rfbi_ticks(t->we_cycle_time, div); in rfbi_convert_timings()
598 recyc = ps_to_rfbi_ticks(t->re_cycle_time, div); in rfbi_convert_timings()
604 cs_pulse = ps_to_rfbi_ticks(t->cs_pulse_width, div); in rfbi_convert_timings()
615 t->tim[2] = div - 1; in rfbi_convert_timings()