Lines Matching defs:div
380 static inline unsigned long round_to_extif_ticks(unsigned long ps, int div)
382 int bus_tick = extif_clk_period * div;
386 static int calc_reg_timing(struct rfbi_timings *t, int div)
388 t->clk_div = div;
390 t->cs_on_time = round_to_extif_ticks(t->cs_on_time, div);
392 t->we_on_time = round_to_extif_ticks(t->we_on_time, div);
393 t->we_off_time = round_to_extif_ticks(t->we_off_time, div);
394 t->we_cycle_time = round_to_extif_ticks(t->we_cycle_time, div);
396 t->re_on_time = round_to_extif_ticks(t->re_on_time, div);
397 t->re_off_time = round_to_extif_ticks(t->re_off_time, div);
398 t->re_cycle_time = round_to_extif_ticks(t->re_cycle_time, div);
400 t->access_time = round_to_extif_ticks(t->access_time, div);
401 t->cs_off_time = round_to_extif_ticks(t->cs_off_time, div);
402 t->cs_pulse_width = round_to_extif_ticks(t->cs_pulse_width, div);
418 int div;
421 for (div = 1; div <= max_clk_div; div++) {
422 if (calc_reg_timing(t, div) == 0)
426 if (div <= max_clk_div)
458 static int ps_to_rfbi_ticks(int time, int div)
464 tick_ps = 1000000000 / (rfbi.l4_khz) * div;
535 int div = t->clk_div;
537 if (div <= 0 || div > 2)
544 weon = ps_to_rfbi_ticks(t->we_on_time, div);
545 weoff = ps_to_rfbi_ticks(t->we_off_time, div);
553 reon = ps_to_rfbi_ticks(t->re_on_time, div);
554 reoff = ps_to_rfbi_ticks(t->re_off_time, div);
562 cson = ps_to_rfbi_ticks(t->cs_on_time, div);
563 csoff = ps_to_rfbi_ticks(t->cs_off_time, div);
582 actim = ps_to_rfbi_ticks(t->access_time, div);
588 wecyc = ps_to_rfbi_ticks(t->we_cycle_time, div);
594 recyc = ps_to_rfbi_ticks(t->re_cycle_time, div);
600 cs_pulse = ps_to_rfbi_ticks(t->cs_pulse_width, div);
611 t->tim[2] = div - 1;