Home
last modified time | relevance | path

Searched refs:DIV_ROUND_UP (Results 1 – 200 of 642) sorted by relevance

1234

/linux-4.1.27/include/linux/mfd/syscon/
Datmel-smc.h87 u32 clk_period = DIV_ROUND_UP(NSEC_PER_SEC, clk_rate); in at91sam9_smc_setup_ns_to_cycles()
91 cycles = DIV_ROUND_UP(timing_ns, clk_period); in at91sam9_smc_setup_ns_to_cycles()
117 u32 clk_period = DIV_ROUND_UP(NSEC_PER_SEC, clk_rate); in at91sam9_smc_pulse_ns_to_cycles()
121 cycles = DIV_ROUND_UP(timing_ns, clk_period); in at91sam9_smc_pulse_ns_to_cycles()
147 u32 clk_period = DIV_ROUND_UP(NSEC_PER_SEC, clk_rate); in at91sam9_smc_cycle_ns_to_cycles()
151 cycles = DIV_ROUND_UP(timing_ns, clk_period); in at91sam9_smc_cycle_ns_to_cycles()
/linux-4.1.27/drivers/media/i2c/
Dsmiapp-pll.c206 DIV_ROUND_UP(limits->max_pll_multiplier, mul)); in __smiapp_pll_calculate()
211 more_mul_min = DIV_ROUND_UP(limits->min_pll_op_freq_hz, in __smiapp_pll_calculate()
218 DIV_ROUND_UP(limits->min_pll_multiplier, mul)); in __smiapp_pll_calculate()
294 min_vt_div = DIV_ROUND_UP(op_pll->pix_clk_div * op_pll->sys_clk_div in __smiapp_pll_calculate()
302 DIV_ROUND_UP(pll->pll_op_clk_freq_hz, in __smiapp_pll_calculate()
314 DIV_ROUND_UP(pll->pll_op_clk_freq_hz, in __smiapp_pll_calculate()
326 DIV_ROUND_UP(min_vt_div, in __smiapp_pll_calculate()
339 DIV_ROUND_UP(max_vt_div, in __smiapp_pll_calculate()
343 DIV_ROUND_UP(pll->pll_op_clk_freq_hz, in __smiapp_pll_calculate()
357 uint16_t pix_div = DIV_ROUND_UP(vt_div, sys_div); in __smiapp_pll_calculate()
[all …]
Daptina-pll.c69 mf_min = DIV_ROUND_UP(limits->m_min, pll->m); in aptina_pll_calculate()
76 mf_max = min(mf_max, DIV_ROUND_UP(limits->n_max * limits->p1_max, div)); in aptina_pll_calculate()
141 p1_min = max(limits->p1_min, DIV_ROUND_UP(limits->out_clock_min * div, in aptina_pll_calculate()
151 mf_low = roundup(max(mf_min, DIV_ROUND_UP(pll->ext_clock * p1, in aptina_pll_calculate()
/linux-4.1.27/tools/include/linux/
Dbitops.h17 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
18 #define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u64))
19 #define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32))
20 #define BITS_TO_BYTES(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE)
/linux-4.1.27/drivers/ssb/
Ddriver_extif.c94 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; in ssb_extif_timing_init()
95 tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; in ssb_extif_timing_init()
96 tmp |= DIV_ROUND_UP(120, ns); in ssb_extif_timing_init()
100 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; in ssb_extif_timing_init()
101 tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; in ssb_extif_timing_init()
102 tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; in ssb_extif_timing_init()
103 tmp |= DIV_ROUND_UP(120, ns); in ssb_extif_timing_init()
Ddriver_chipcommon.c443 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */ in ssb_chipco_timing_init()
444 tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 40ns */ in ssb_chipco_timing_init()
445 tmp |= DIV_ROUND_UP(240, ns); /* Waitcount-0 = 240ns */ in ssb_chipco_timing_init()
449 tmp = DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_3_SHIFT; /* Waitcount-3 = 10nS */ in ssb_chipco_timing_init()
450 tmp |= DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_1_SHIFT; /* Waitcount-1 = 10nS */ in ssb_chipco_timing_init()
451 tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120nS */ in ssb_chipco_timing_init()
462 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */ in ssb_chipco_timing_init()
463 tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; /* Waitcount-2 = 20ns */ in ssb_chipco_timing_init()
464 tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */ in ssb_chipco_timing_init()
465 tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120ns */ in ssb_chipco_timing_init()
/linux-4.1.27/drivers/ide/
Dpalm_bk3710.c85 t0 = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].cycletime, in palm_bk3710_setudmamode()
87 tenv = DIV_ROUND_UP(20, ideclk_period) - 1; in palm_bk3710_setudmamode()
88 trp = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].rptime, in palm_bk3710_setudmamode()
125 t0 = DIV_ROUND_UP(cycletime, ideclk_period); in palm_bk3710_setdmamode()
126 td = DIV_ROUND_UP(t->active, ideclk_period); in palm_bk3710_setdmamode()
154 t0 = DIV_ROUND_UP(cycletime, ideclk_period); in palm_bk3710_setpiomode()
155 t2 = DIV_ROUND_UP(t->active, ideclk_period); in palm_bk3710_setpiomode()
176 t0 = DIV_ROUND_UP(t->cyc8b, ideclk_period); in palm_bk3710_setpiomode()
177 t2 = DIV_ROUND_UP(t->act8b, ideclk_period); in palm_bk3710_setpiomode()
Dtx4938ide.c35 wt = DIV_ROUND_UP(t->act8b, cycle) - 2; in tx4938ide_tune_ebusc()
37 wt = max_t(int, wt, DIV_ROUND_UP(35, cycle)); in tx4938ide_tune_ebusc()
43 shwt = DIV_ROUND_UP(t->setup, cycle); in tx4938ide_tune_ebusc()
Dcmd640.c536 cycle_count = DIV_ROUND_UP(cycle_time, clock_time); in cmd640_set_mode()
538 setup_count = DIV_ROUND_UP(setup_time, clock_time); in cmd640_set_mode()
540 active_count = DIV_ROUND_UP(active_time, clock_time); in cmd640_set_mode()
544 recovery_count = DIV_ROUND_UP(recovery_time, clock_time); in cmd640_set_mode()
/linux-4.1.27/drivers/gpu/drm/i915/
Dintel_dsi_panel_vbt.c444 pclk += DIV_ROUND_UP(mode->vtotal * in vbt_panel_init()
465 burst_mode_ratio = DIV_ROUND_UP( in vbt_panel_init()
469 pclk = DIV_ROUND_UP(pclk * burst_mode_ratio, 100); in vbt_panel_init()
528 intel_dsi->lp_byte_clk = DIV_ROUND_UP(tlpx_ns * ui_den, 8 * ui_num); in vbt_panel_init()
539 prepare_cnt = DIV_ROUND_UP(ths_prepare_ns * ui_den, ui_num * 2); in vbt_panel_init()
542 exit_zero_cnt = DIV_ROUND_UP( in vbt_panel_init()
558 clk_zero_cnt = DIV_ROUND_UP( in vbt_panel_init()
564 trail_cnt = DIV_ROUND_UP(tclk_trail_ns * ui_den, 2 * ui_num); in vbt_panel_init()
598 tlpx_ui = DIV_ROUND_UP(tlpx_ns * ui_den, ui_num); in vbt_panel_init()
603 lp_to_hs_switch = DIV_ROUND_UP(4 * tlpx_ui + prepare_cnt * 2 + in vbt_panel_init()
[all …]
Dintel_dsi_pll.c92 hsync_bytes = DIV_ROUND_UP(hsync * bpp, 8); in dsi_rr_formula()
93 hbp_bytes = DIV_ROUND_UP(hbp * bpp, 8); in dsi_rr_formula()
94 hactive_bytes = DIV_ROUND_UP(hactive * bpp, 8); in dsi_rr_formula()
95 hfp_bytes = DIV_ROUND_UP(hfp * bpp, 8); in dsi_rr_formula()
Dintel_audio.c59 { DIV_ROUND_UP(25200 * 1000, 1001), AUD_CONFIG_PIXEL_CLOCK_HDMI_25175 },
65 { DIV_ROUND_UP(74250 * 1000, 1001), AUD_CONFIG_PIXEL_CLOCK_HDMI_74176 },
67 { DIV_ROUND_UP(148500 * 1000, 1001), AUD_CONFIG_PIXEL_CLOCK_HDMI_148352 },
Dintel_pm.c593 entries_required = DIV_ROUND_UP(entries_required, wm->cacheline_size); in intel_calculate_wm()
738 entries = DIV_ROUND_UP(entries, display->cacheline_size); in g4x_compute_wm0()
750 entries = DIV_ROUND_UP(entries, cursor->cacheline_size); in g4x_compute_wm0()
828 entries = DIV_ROUND_UP(min(small, large), display->cacheline_size); in g4x_compute_srwm()
833 entries = DIV_ROUND_UP(entries, cursor->cacheline_size); in g4x_compute_srwm()
934 entries = DIV_ROUND_UP(clock, 1000) * pixel_size; in vlv_compute_drain_latency()
967 entries = DIV_ROUND_UP(clock, 1000) * pixel_size; in vlv_compute_wm()
978 return fifo_size - clamp(DIV_ROUND_UP(256 * entries, 64), 0, fifo_size - 8); in vlv_compute_wm()
1210 entries = DIV_ROUND_UP(entries, I915_FIFO_LINE_SIZE); in i965_update_wm()
1220 entries = DIV_ROUND_UP(entries, in i965_update_wm()
[all …]
/linux-4.1.27/drivers/pwm/
Dpwm-img.c103 output_clk_hz = DIV_ROUND_UP(NSEC_PER_SEC, period_ns); in img_pwm_config()
105 mul = DIV_ROUND_UP(input_clk_hz, output_clk_hz); in img_pwm_config()
108 timebase = DIV_ROUND_UP(mul, 1); in img_pwm_config()
111 timebase = DIV_ROUND_UP(mul, 8); in img_pwm_config()
114 timebase = DIV_ROUND_UP(mul, 64); in img_pwm_config()
117 timebase = DIV_ROUND_UP(mul, 512); in img_pwm_config()
124 duty = DIV_ROUND_UP(timebase * duty_ns, period_ns); in img_pwm_config()
/linux-4.1.27/drivers/irqchip/
Dirq-gic.c62 u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)];
63 u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)];
64 u32 saved_spi_target[DIV_ROUND_UP(1020, 4)];
463 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++) in gic_dist_save()
467 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++) in gic_dist_save()
471 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++) in gic_dist_save()
500 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++) in gic_dist_restore()
504 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++) in gic_dist_restore()
508 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++) in gic_dist_restore()
512 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++) in gic_dist_restore()
[all …]
Dirq-atmel-aic-common.c227 nchips = DIV_ROUND_UP(nirqs, 32); in aic_common_of_init()
/linux-4.1.27/arch/unicore32/mm/
Dinit.c401 DIV_ROUND_UP(PAGE_SIZE, SZ_1K), in mem_init()
403 DIV_ROUND_UP((VMALLOC_END - VMALLOC_START), SZ_1M), in mem_init()
405 DIV_ROUND_UP(((unsigned long)high_memory - PAGE_OFFSET), SZ_1M), in mem_init()
407 DIV_ROUND_UP((MODULES_END - MODULES_VADDR), SZ_1M), in mem_init()
410 DIV_ROUND_UP((__init_end - __init_begin), SZ_1K), in mem_init()
412 DIV_ROUND_UP((_etext - _stext), SZ_1K), in mem_init()
414 DIV_ROUND_UP((_edata - _sdata), SZ_1K)); in mem_init()
/linux-4.1.27/drivers/media/platform/s5p-mfc/
Dregs-mfc-v8.h112 ((DIV_ROUND_UP((mbw * 16), 64) * DIV_ROUND_UP((mbh * 16), 64) * 256) \
113 + (DIV_ROUND_UP((mbw) * (mbh), 32) * 16))
Ds5p_mfc_opr_v6.h23 #define MB_WIDTH(x_size) DIV_ROUND_UP(x_size, 16)
24 #define MB_HEIGHT(y_size) DIV_ROUND_UP(y_size, 16)
Dregs-mfc-v6.h382 (((((imw + 127) / 64) * 16) * DIV_ROUND_UP(imh, 64) * 256) + \
383 (DIV_ROUND_UP((mbw) * (mbh), 32) * 16))
/linux-4.1.27/drivers/memory/
Demif.c439 val = max(min_tck->tWTR, DIV_ROUND_UP(timings->tWTR, t_ck)) - 1; in get_sdram_tim_1_shdw()
443 val = DIV_ROUND_UP(timings->tFAW, t_ck*4); in get_sdram_tim_1_shdw()
445 val = max(min_tck->tRRD, DIV_ROUND_UP(timings->tRRD, t_ck)); in get_sdram_tim_1_shdw()
448 val = DIV_ROUND_UP(timings->tRAS_min + timings->tRPab, t_ck) - 1; in get_sdram_tim_1_shdw()
451 val = max(min_tck->tRASmin, DIV_ROUND_UP(timings->tRAS_min, t_ck)); in get_sdram_tim_1_shdw()
454 val = max(min_tck->tWR, DIV_ROUND_UP(timings->tWR, t_ck)) - 1; in get_sdram_tim_1_shdw()
457 val = max(min_tck->tRCD, DIV_ROUND_UP(timings->tRCD, t_ck)) - 1; in get_sdram_tim_1_shdw()
460 val = max(min_tck->tRPab, DIV_ROUND_UP(timings->tRPab, t_ck)) - 1; in get_sdram_tim_1_shdw()
472 val = max(min_tck->tWTR, DIV_ROUND_UP(timings->tWTR, t_ck)) - 1; in get_sdram_tim_1_shdw_derated()
480 val = DIV_ROUND_UP(timings->tFAW + 7500, 4 * t_ck) - 1; in get_sdram_tim_1_shdw_derated()
[all …]
/linux-4.1.27/drivers/clk/
Dclk-divider.c130 return DIV_ROUND_UP(parent_rate, div); in divider_recalc_rate()
208 int div = DIV_ROUND_UP(parent_rate, rate); in _div_round_up()
225 up = DIV_ROUND_UP(parent_rate, rate); in _div_round_closest()
236 up_rate = DIV_ROUND_UP(parent_rate, up); in _div_round_closest()
237 down_rate = DIV_ROUND_UP(parent_rate, down); in _div_round_closest()
316 now = DIV_ROUND_UP(parent_rate, i); in clk_divider_bestdiv()
340 return DIV_ROUND_UP(*prate, div); in divider_round_rate()
355 return DIV_ROUND_UP(*prate, bestdiv); in clk_divider_round_rate()
368 div = DIV_ROUND_UP(parent_rate, rate); in divider_get_val()
Dclk-clps711x.c68 f_pll = DIV_ROUND_UP(CLPS711X_OSC_FREQ * tmp, 2); in _clps711x_clk_init()
82 f_bus = DIV_ROUND_UP(f_cpu, 2); in _clps711x_clk_init()
Dclk-axi-clkgen.c158 d_min = max_t(unsigned long, DIV_ROUND_UP(fin, fpfd_max), 1); in axi_clkgen_calc_params()
161 m_min = max_t(unsigned long, DIV_ROUND_UP(fvco_min, fin) * d_min, 1); in axi_clkgen_calc_params()
165 _d_min = max(d_min, DIV_ROUND_UP(fin * m, fvco_max)); in axi_clkgen_calc_params()
Dclk-pwm.c83 pwm->period != DIV_ROUND_UP(NSEC_PER_SEC, clk_pwm->fixed_rate)) { in clk_pwm_probe()
/linux-4.1.27/include/uapi/linux/
Dmroute6.h50 #if !defined(DIV_ROUND_UP)
51 #define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y)) macro
56 if_mask ifs_bits[DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
/linux-4.1.27/kernel/rcu/
Dtree.h54 # define NUM_RCU_LVL_1 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_1)
61 # define NUM_RCU_LVL_1 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_2)
62 # define NUM_RCU_LVL_2 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_1)
68 # define NUM_RCU_LVL_1 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_3)
69 # define NUM_RCU_LVL_2 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_2)
70 # define NUM_RCU_LVL_3 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_1)
/linux-4.1.27/drivers/gpu/drm/vmwgfx/
Dsvga3d_surfacedefs.h39 #define DIV_ROUND_UP(x, y) (((x) + (y) - 1) / (y)) macro
756 block_size->width = DIV_ROUND_UP(pixel_size->width, in svga3dsurface_get_size_in_blocks()
758 block_size->height = DIV_ROUND_UP(pixel_size->height, in svga3dsurface_get_size_in_blocks()
760 block_size->depth = DIV_ROUND_UP(pixel_size->depth, in svga3dsurface_get_size_in_blocks()
872 const u32 rowstride = DIV_ROUND_UP(width, bw) * desc->bytes_per_block; in svga3dsurface_get_pixel_offset()
873 const u32 imgstride = DIV_ROUND_UP(height, bh) * rowstride; in svga3dsurface_get_pixel_offset()
Dvmwgfx_mob.c352 data_size = DIV_ROUND_UP(data_size, PAGE_SIZE); in vmw_mob_calculate_pt_pages()
460 unsigned long num_pt_pages = DIV_ROUND_UP(pt_size, PAGE_SIZE); in vmw_mob_build_pt()
/linux-4.1.27/drivers/clk/sunxi/
Dclk-sun9i-core.c43 n = DIV_ROUND_UP(*freq, 6000000); in sun9i_a80_get_pll4_factors()
122 div = DIV_ROUND_UP(parent_rate, *freq); in sun9i_a80_get_gt_factors()
187 _p = order_base_2(DIV_ROUND_UP(parent_rate, *freq)); in sun9i_a80_get_ahb_factors()
274 div = DIV_ROUND_UP(parent_rate, *freq); in sun9i_a80_get_apb1_factors()
Dclk-sunxi.c93 div = DIV_ROUND_UP(parent_rate, rate); in sun6i_ahb1_clk_round()
106 calcm = DIV_ROUND_UP(div, 1 << calcp); in sun6i_ahb1_clk_round()
454 *n = DIV_ROUND_UP(div, (*k+1)); in sun4i_get_pll5_factors()
481 *n = DIV_ROUND_UP(div, (*k+1)) - 1; in sun6i_a31_get_pll6_factors()
508 div = order_base_2(DIV_ROUND_UP(parent_rate, *freq)); in sun5i_a13_get_ahb_factors()
537 parent_rate = DIV_ROUND_UP(parent_rate, *freq); in sun4i_get_apb1_factors()
583 div = DIV_ROUND_UP(parent_rate, *freq); in sun7i_a20_get_out_factors()
594 calcm = DIV_ROUND_UP(div, 1 << calcp); in sun7i_a20_get_out_factors()
Dclk-sun8i-mbus.c41 div = DIV_ROUND_UP(parent_rate, *freq); in sun8i_a23_get_mbus_factors()
Dclk-mod0.c40 div = DIV_ROUND_UP(parent_rate, *freq); in sun4i_a10_get_mod0_factors()
51 calcm = DIV_ROUND_UP(div, 1 << calcp); in sun4i_a10_get_mod0_factors()
Dclk-sun6i-ar100.c68 div = DIV_ROUND_UP(parent_rate, rate); in ar100_determine_rate()
Dclk-sun9i-mmc.c108 count = DIV_ROUND_UP((r->end - r->start + 1), SUN9I_MMC_WIDTH); in sun9i_a80_mmc_config_clk_probe()
/linux-4.1.27/arch/arm/mach-omap2/
Domap_twl.c59 return DIV_ROUND_UP(uv - 600000, 12500); in twl4030_uv_to_vsel()
130 return DIV_ROUND_UP(uv - 709000, 12660) + 1; in twl6030_uv_to_vsel()
132 return DIV_ROUND_UP(uv - 607700, 12660) + 1; in twl6030_uv_to_vsel()
/linux-4.1.27/lib/mpi/
Dmpicoder.c55 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_raw_data()
99 nbytes = DIV_ROUND_UP(nbits, 8); in mpi_read_from_buffer()
100 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_from_buffer()
196 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_set_buffer()
/linux-4.1.27/drivers/video/fbdev/omap2/dss/
Dhdmi_pll.c58 n = DIV_ROUND_UP(clkin, hw->fint_max); in hdmi_pll_compute()
63 m2 = DIV_ROUND_UP(min_dco, target_bitclk); in hdmi_pll_compute()
84 sd = DIV_ROUND_UP(fint * m, 250000000); in hdmi_pll_compute()
Dpll.c143 m_start = max(DIV_ROUND_UP(clkdco, out_max), 1ul); in dss_pll_hsdiv_calc()
173 n_start = max(DIV_ROUND_UP(clkin, fint_hw_max), 1ul); in dss_pll_calc()
181 m_start = max(DIV_ROUND_UP(DIV_ROUND_UP(pll_min, fint), 2), in dss_pll_calc()
Ddsi.c1291 lp_clk_div = DIV_ROUND_UP(dsi_fclk, lp_clk_max * 2); in dsi_lp_clock_calc()
1391 cinfo->mX[HSDIV_DSI] = DIV_ROUND_UP(cinfo->clkdco, max_dsi_fck); in dsi_pll_calc_dsi_fck()
3507 width_bytes = DIV_ROUND_UP(timings->x_res * bpp, 8); in dsi_config_cmd_mode_interleaving()
3508 bllp = hbp + hfp + hsa + DIV_ROUND_UP(width_bytes + 6, ndl); in dsi_config_cmd_mode_interleaving()
3677 ths_eot = DIV_ROUND_UP(4, ndl); in dsi_proto_timings()
3679 ddr_clk_pre = DIV_ROUND_UP(tclk_pre + tlpx + tclk_zero + tclk_prepare, in dsi_proto_timings()
3681 ddr_clk_post = DIV_ROUND_UP(tclk_post + ths_trail, 4) + ths_eot; in dsi_proto_timings()
3695 enter_hs_mode_lat = 1 + DIV_ROUND_UP(tlpx, 4) + in dsi_proto_timings()
3696 DIV_ROUND_UP(ths_prepare, 4) + in dsi_proto_timings()
3697 DIV_ROUND_UP(ths_zero + 3, 4); in dsi_proto_timings()
[all …]
Ddss.c543 fckd_stop = max(DIV_ROUND_UP(prate * m, fck_hw_max), 1ul); in dss_div_calc()
546 fck = DIV_ROUND_UP(prate, fckd) * m; in dss_div_calc()
593 fck_div = DIV_ROUND_UP(prate * dss.feat->dss_fck_multiplier, in dss_setup_default_clock()
595 fck = DIV_ROUND_UP(prate, fck_div) * dss.feat->dss_fck_multiplier; in dss_setup_default_clock()
/linux-4.1.27/arch/s390/kernel/
Dsuspend.c55 return DIV_ROUND_UP(pages, PAGE_KEY_DATA_SIZE); in page_key_additional_pages()
81 size = DIV_ROUND_UP(pages, PAGE_KEY_DATA_SIZE); in page_key_alloc()
Dperf_cpum_sf.c305 CPUM_SF_SDB_DIAG_FACTOR = DIV_ROUND_UP(si.dsdes, si.bsdes); in sfb_set_limits()
426 n_sdb = DIV_ROUND_UP(freq, factor * ((PAGE_SIZE-64) / sample_size)); in allocate_buffers()
455 return min_t(unsigned long, min, DIV_ROUND_UP(percent * base, 100)); in min_percent()
496 ratio = DIV_ROUND_UP(100 * OVERFLOW_REG(hwc) * cpuhw->sfb.num_sdb, in sfb_account_overflows()
1291 OVERFLOW_REG(hwc) = DIV_ROUND_UP(OVERFLOW_REG(hwc) + in hw_perf_event_update()
/linux-4.1.27/drivers/spi/
Dspi-orion.c136 spr = DIV_ROUND_UP(spr, speed); in orion_spi_baudrate_set()
160 rate = DIV_ROUND_UP(tclk_hz, speed); in orion_spi_baudrate_set()
475 DIV_ROUND_UP(tclk_hz, devdata->min_divisor)); in orion_spi_probe()
478 DIV_ROUND_UP(tclk_hz, devdata->min_divisor); in orion_spi_probe()
479 master->min_speed_hz = DIV_ROUND_UP(tclk_hz, devdata->max_divisor); in orion_spi_probe()
Dspi-bcm63xx-hsspi.c130 reg = DIV_ROUND_UP(2048, DIV_ROUND_UP(bs->speed_hz, hz)); in bcm63xx_hsspi_set_clk()
Dspi-txx9.c191 int n = DIV_ROUND_UP(c->baseclk, speed_hz) - 1; in txx9spi_work_one()
356 master->min_speed_hz = DIV_ROUND_UP(c->baseclk, SPI_MAX_DIVIDER + 1); in txx9spi_probe()
Dspi-efm32.c136 clkdiv = 64 * (DIV_ROUND_UP(2 * clkfreq, speed) - 4); in efm32_spi_setup_transfer()
197 t->len * DIV_ROUND_UP(t->bits_per_word, 8); in efm32_spi_txrx_bufs()
Dspi-xcomm.c82 divider = DIV_ROUND_UP(SPI_XCOMM_CLOCK, t->speed_hz); in spi_xcomm_setup_transfer()
/linux-4.1.27/drivers/gpu/host1x/hw/
Dintr_hw.c50 for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); i++) { in syncpt_thresh_isr()
67 for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); ++i) { in _host1x_intr_disable_all_syncpt_intrs()
/linux-4.1.27/drivers/i2c/busses/
Di2c-rk3x.c520 DIV_ROUND_UP((scl_rise_ns + spec_setup_start) * 1000, 875)); in rk3x_i2c_calc_divs()
522 DIV_ROUND_UP((scl_rise_ns + spec_setup_start + in rk3x_i2c_calc_divs()
530 clk_rate_khz = DIV_ROUND_UP(clk_rate, 1000); in rk3x_i2c_calc_divs()
537 min_total_div = DIV_ROUND_UP(clk_rate_khz, scl_rate_khz * 8); in rk3x_i2c_calc_divs()
540 min_low_div = DIV_ROUND_UP(clk_rate_khz * min_low_ns, 8 * 1000000); in rk3x_i2c_calc_divs()
541 min_high_div = DIV_ROUND_UP(clk_rate_khz * min_high_ns, 8 * 1000000); in rk3x_i2c_calc_divs()
576 ideal_low_div = DIV_ROUND_UP(clk_rate_khz * min_low_ns, in rk3x_i2c_calc_divs()
Di2c-mxs.c703 divider = DIV_ROUND_UP(clk, speed); in mxs_i2c_derive_timing()
745 leadin = DIV_ROUND_UP(600 * (clk / 1000000), 1000); in mxs_i2c_derive_timing()
746 bus_free = DIV_ROUND_UP(1300 * (clk / 1000000), 1000); in mxs_i2c_derive_timing()
751 leadin = DIV_ROUND_UP(4700 * (clk / 1000000), 1000); in mxs_i2c_derive_timing()
752 bus_free = DIV_ROUND_UP(4700 * (clk / 1000000), 1000); in mxs_i2c_derive_timing()
Di2c-nomadik.c382 slsu = DIV_ROUND_UP(100, ns); /* Fast */ in setup_i2c_controller()
385 slsu = DIV_ROUND_UP(10, ns); /* High */ in setup_i2c_controller()
389 slsu = DIV_ROUND_UP(250, ns); /* Standard */ in setup_i2c_controller()
/linux-4.1.27/fs/jfs/
Djfs_dtree.h77 #define NDTINTERNAL(klen) (DIV_ROUND_UP((4 + (klen)), 15))
136 #define NDTLEAF_LEGACY(klen) (DIV_ROUND_UP((2 + (klen)), 15))
/linux-4.1.27/drivers/clk/ti/
Ddivider.c116 return DIV_ROUND_UP(parent_rate, div); in ti_clk_divider_recalc_rate()
160 bestdiv = DIV_ROUND_UP(parent_rate, rate); in ti_clk_divider_bestdiv()
186 now = DIV_ROUND_UP(parent_rate, i); in ti_clk_divider_bestdiv()
209 return DIV_ROUND_UP(*prate, div); in ti_clk_divider_round_rate()
225 div = DIV_ROUND_UP(parent_rate, rate); in ti_clk_divider_set_rate()
Dfapll.c423 synth_post_div_m = DIV_ROUND_UP(frac_rate, rate); in ti_fapll_synth_round_rate()
424 r = DIV_ROUND_UP(frac_rate, synth_post_div_m); in ti_fapll_synth_round_rate()
458 post_div_m = DIV_ROUND_UP(frac_rate, rate); in ti_fapll_synth_set_rate()
460 post_rate = DIV_ROUND_UP(frac_rate, post_div_m); in ti_fapll_synth_set_rate()
/linux-4.1.27/drivers/firewire/
Dcore-card.c248 delayed ? DIV_ROUND_UP(HZ, 100) : 0)) in fw_schedule_bus_reset()
343 card->reset_jiffies + DIV_ROUND_UP(HZ, 8)); in bm_work()
410 fw_schedule_bm_work(card, DIV_ROUND_UP(HZ, 8)); in bm_work()
434 fw_schedule_bm_work(card, DIV_ROUND_UP(HZ, 8)); in bm_work()
542 DIV_ROUND_UP(DEFAULT_SPLIT_TIMEOUT * HZ, 8000); in fw_card_initialize()
/linux-4.1.27/drivers/net/wireless/ti/wlcore/
Dscan.c180 min_dwell_time_active = DIV_ROUND_UP(min_dwell_time_active, 1000); in wlcore_scan_get_channels()
181 max_dwell_time_active = DIV_ROUND_UP(max_dwell_time_active, 1000); in wlcore_scan_get_channels()
182 dwell_time_passive = DIV_ROUND_UP(dwell_time_passive, 1000); in wlcore_scan_get_channels()
183 dwell_time_dfs = DIV_ROUND_UP(dwell_time_dfs, 1000); in wlcore_scan_get_channels()
/linux-4.1.27/include/linux/
Diommu-helper.h31 return DIV_ROUND_UP(size, io_page_size); in iommu_num_pages()
Ddelay.h39 udelay(DIV_ROUND_UP(x, 1000)); in ndelay()
Dbitops.h13 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
Dradix-tree.h76 #define RADIX_TREE_MAX_PATH (DIV_ROUND_UP(RADIX_TREE_INDEX_BITS, \
/linux-4.1.27/arch/arm/mach-s3c24xx/
Dcpufreq-utils.c47 refresh = DIV_ROUND_UP(refresh, (1000 * 1000)); /* apply scale */ in s3c2410_cpufreq_setrefresh()
Diotiming-s3c2412.c70 return cyc_tns ? DIV_ROUND_UP(cyc_tns, clk_tns) : 0; in to_div()
278 refresh = DIV_ROUND_UP(refresh, (1000 * 1000)); /* apply scale */ in s3c2412_cpufreq_setrefresh()
/linux-4.1.27/drivers/base/regmap/
Dregcache-lzo.c112 DIV_ROUND_UP(map->cache_size_raw, in regcache_lzo_get_blkindex()
120 (DIV_ROUND_UP(map->cache_size_raw, in regcache_lzo_get_blkpos()
127 return DIV_ROUND_UP(map->cache_size_raw, in regcache_lzo_get_blksize()
/linux-4.1.27/arch/m68k/include/asm/
Ddelay.h117 #define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), …
/linux-4.1.27/drivers/clk/mxs/
Dclk-ssp.c36 clock_rate = DIV_ROUND_UP(ssp_clk, rate * clock_divide); in mxs_ssp_set_clk_rate()
/linux-4.1.27/arch/arm/include/asm/
Dkprobes.h75 #define MAX_COPIED_INSN DIV_ROUND_UP(RELATIVEJUMP_SIZE, sizeof(kprobe_opcode_t))
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/fb/
Dnv25.c32 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv25_fb_tile_comp()
Dnv36.c32 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv36_fb_tile_comp()
Dnv35.c32 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv35_fb_tile_comp()
Dnv40.c32 u32 tiles = DIV_ROUND_UP(size, 0x80); in nv40_fb_tile_comp()
Dnv20.c45 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv20_fb_tile_comp()
Dnv30.c53 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv30_fb_tile_comp()
/linux-4.1.27/drivers/watchdog/
Ds3c2410_wdt.c315 freq = DIV_ROUND_UP(freq, 128); in s3c2410wdt_set_heartbeat()
327 divisor = DIV_ROUND_UP(count, 0xffff); in s3c2410wdt_set_heartbeat()
336 __func__, timeout, divisor, count, DIV_ROUND_UP(count, divisor)); in s3c2410wdt_set_heartbeat()
338 count = DIV_ROUND_UP(count, divisor); in s3c2410wdt_set_heartbeat()
Dintel-mid_wdt.c57 in_size = DIV_ROUND_UP(sizeof(ipc_wd_start), 4); in wdt_start()
Df71808e_wdt.c230 watchdog.timer_val = DIV_ROUND_UP(timeout, 60); in watchdog_set_timeout()
705 DIV_ROUND_UP(start_withtimeout, 60)); in watchdog_init()
/linux-4.1.27/drivers/gpu/drm/rcar-du/
Drcar_du_drv.h69 #define RCAR_DU_MAX_GROUPS DIV_ROUND_UP(RCAR_DU_MAX_CRTCS, 2)
Drcar_du_kms.c121 unsigned int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in rcar_du_dumb_create()
676 num_groups = DIV_ROUND_UP(rcdu->num_crtcs, 2); in rcar_du_modeset_init()
/linux-4.1.27/drivers/gpu/drm/armada/
Darmada_510.c68 div = DIV_ROUND_UP(ref, rate); in armada510_crtc_compute_clock()
/linux-4.1.27/fs/gfs2/
Dbmap.h42 tmp = DIV_ROUND_UP(tmp, sdp->sd_inptrs); in gfs2_write_calc_reserv()
Dxattr.c54 (sizeof(__be64) * DIV_ROUND_UP(dsize, jbsize)), 8); in ea_calc_size()
468 unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); in gfs2_iter_unstuffed()
683 ea->ea_num_ptrs = DIV_ROUND_UP(er->er_data_len, sdp->sd_jbsize); in ea_write()
810 blks += DIV_ROUND_UP(er.er_data_len, jbsize); in ea_init()
956 blks = 2 + DIV_ROUND_UP(es->es_er->er_data_len, in ea_set_simple()
1069 blks += DIV_ROUND_UP(er.er_data_len, GFS2_SB(&ip->i_inode)->sd_jbsize); in ea_set_i()
1243 unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); in ea_acl_chmod_unstuffed()
Dlog.c60 blks += DIV_ROUND_UP(nstruct - first, second); in gfs2_struct2blk()
453 reserved += DIV_ROUND_UP(mbuf, buf_limit(sdp)); in calc_reserved()
454 reserved += DIV_ROUND_UP(dbuf, databuf_limit(sdp)); in calc_reserved()
/linux-4.1.27/drivers/acpi/
Dacpi_cmos_rtc.c46 for (i = 0; i < DIV_ROUND_UP(bits, 8); ++i, ++address, ++value) in acpi_cmos_rtc_space_handler()
/linux-4.1.27/drivers/infiniband/hw/cxgb4/
Dqp.c277 res_wr->len16_pkd = cpu_to_be32(DIV_ROUND_UP(wr_len, 16)); in create_qp()
496 *len16 = DIV_ROUND_UP(size, 16); in build_rdma_send()
539 *len16 = DIV_ROUND_UP(size, 16); in build_rdma_write()
569 *len16 = DIV_ROUND_UP(sizeof wqe->read, 16); in build_rdma_read()
583 *len16 = DIV_ROUND_UP(sizeof wqe->recv + in build_rdma_recv()
631 *len16 = DIV_ROUND_UP(sizeof(wqe->fr) + sizeof(*sglp), 16); in build_fastreg()
654 *len16 = DIV_ROUND_UP(sizeof(wqe->fr) + sizeof(*imdp) in build_fastreg()
665 *len16 = DIV_ROUND_UP(sizeof wqe->inv, 16); in build_inv_stag()
840 idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); in c4iw_post_send()
912 idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); in c4iw_post_receive()
[all …]
Dmem.c87 req->wr.wr_mid = cpu_to_be32(FW_WR_LEN16_V(DIV_ROUND_UP(wr_len, 16))); in _c4iw_write_mem_dma_aligned()
91 req->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(req->wr), 16)); in _c4iw_write_mem_dma_aligned()
126 num_wqe = DIV_ROUND_UP(len, C4IW_MAX_INLINE_SIZE); in _c4iw_write_mem_inline()
151 FW_WR_LEN16_V(DIV_ROUND_UP(wr_len, 16))); in _c4iw_write_mem_inline()
155 DIV_ROUND_UP(copy_len, T4_ULPTX_MIN_IO))); in _c4iw_write_mem_inline()
156 req->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(req->wr), in _c4iw_write_mem_inline()
/linux-4.1.27/lib/
Dkfifo.c207 ret = DIV_ROUND_UP(ret + len - l, esize); in kfifo_copy_from_user()
211 ret = DIV_ROUND_UP(ret, esize); in kfifo_copy_from_user()
267 ret = DIV_ROUND_UP(ret + len - l, esize); in kfifo_copy_to_user()
271 ret = DIV_ROUND_UP(ret, esize); in kfifo_copy_to_user()
Dbch.c87 #define BCH_ECC_WORDS(_p) DIV_ROUND_UP(GF_M(_p)*GF_T(_p), 32)
88 #define BCH_ECC_BYTES(_p) DIV_ROUND_UP(GF_M(_p)*GF_T(_p), 8)
1084 const int plen = DIV_ROUND_UP(bch->ecc_bits+1, 32); in build_mod8_tables()
1085 const int ecclen = DIV_ROUND_UP(bch->ecc_bits, 32); in build_mod8_tables()
1175 genpoly = bch_alloc(DIV_ROUND_UP(m*t+1, 32)*sizeof(*genpoly), &err); in compute_generator_polynomial()
1297 words = DIV_ROUND_UP(m*t, 32); in init_bch()
1298 bch->ecc_bytes = DIV_ROUND_UP(m*t, 8); in init_bch()
Diov_iter.c591 n = DIV_ROUND_UP(len, PAGE_SIZE); in iov_iter_get_pages()
636 n = DIV_ROUND_UP(len, PAGE_SIZE); in iov_iter_get_pages_alloc()
761 npages += DIV_ROUND_UP(p + v.iov_len, PAGE_SIZE) in iov_iter_npages()
771 npages += DIV_ROUND_UP(p + v.iov_len, PAGE_SIZE) in iov_iter_npages()
Ddigsig.c117 mlen = DIV_ROUND_UP(mblen, 8); in digsig_verify_rsa()
/linux-4.1.27/net/9p/
Dtrans_virtio.c343 nr_pages = DIV_ROUND_UP(n + *offs, PAGE_SIZE); in p9_get_mapped_pages()
364 nr_pages = DIV_ROUND_UP((unsigned long)p + len, PAGE_SIZE) - in p9_get_mapped_pages()
416 out_nr_pages = DIV_ROUND_UP(n + offs, PAGE_SIZE); in p9_virtio_zc_request()
427 in_nr_pages = DIV_ROUND_UP(n + offs, PAGE_SIZE); in p9_virtio_zc_request()
/linux-4.1.27/drivers/gpu/drm/gma500/
Doaktrail_hdmi.c180 np_min = DIV_ROUND_UP(oaktrail_hdmi_limit.vco.min, target * 10); in oaktrail_hdmi_find_dpll()
187 nr_min = DIV_ROUND_UP((refclk * 1000), (target * 10 * np_max)); in oaktrail_hdmi_find_dpll()
188 nr_max = DIV_ROUND_UP((refclk * 1000), (target * 10 * np_min)); in oaktrail_hdmi_find_dpll()
194 np = DIV_ROUND_UP((refclk * 1000), (target * 10 * nr_max)); in oaktrail_hdmi_find_dpll()
195 nr = DIV_ROUND_UP((refclk * 1000), (target * 10 * np)); in oaktrail_hdmi_find_dpll()
/linux-4.1.27/sound/firewire/
Dpackets-buffer.c42 pages = DIV_ROUND_UP(count, packets_per_page); in iso_packets_buffer_init()
Diso-resources.c59 s400_bytes = DIV_ROUND_UP(bytes, 1 << (speed - SCODE_400)); in packet_bandwidth()
/linux-4.1.27/drivers/tty/serial/8250/
D8250_mtk.c77 quot = DIV_ROUND_UP(port->uartclk, 4 * baud); in mtk8250_set_termios()
84 quot = DIV_ROUND_UP(port->uartclk, 256 * baud); in mtk8250_set_termios()
/linux-4.1.27/drivers/staging/media/omap4iss/
Diss_csiphy.c208 csi2phy.ths_term = DIV_ROUND_UP(25 * csi2_ddrclk_khz, 2000000) - 1; in omap4iss_csiphy_config()
209 csi2phy.ths_settle = DIV_ROUND_UP(90 * csi2_ddrclk_khz, 1000000) + 3; in omap4iss_csiphy_config()
/linux-4.1.27/drivers/gpu/drm/radeon/
Drv770_dma.c58 num_loops = DIV_ROUND_UP(size_in_dw, 0xFFFF); in rv770_copy_dma()
Devergreen_dma.c124 num_loops = DIV_ROUND_UP(size_in_dw, 0xfffff); in evergreen_copy_dma()
Dsi_dma.c247 num_loops = DIV_ROUND_UP(size_in_bytes, 0xfffff); in si_copy_dma()
/linux-4.1.27/drivers/video/console/
Dbitblit.c29 int width = DIV_ROUND_UP(vc->vc_font.width, 8); in update_attr()
148 u32 width = DIV_ROUND_UP(vc->vc_font.width, 8); in bit_putcs()
177 pitch = DIV_ROUND_UP(image.width, 8) + scan_align; in bit_putcs()
242 int w = DIV_ROUND_UP(vc->vc_font.width, 8), c; in bit_cursor()
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb4/
Dcxgb4_uld.h57 (w)->wr.wr_mid = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*w), 16)) | \
70 (w)->wr.wr_mid = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(wrlen, 16)) | \
Dcxgb4_debugfs.c1684 int eth_entries = DIV_ROUND_UP(adap->sge.ethqsets, 4); in sge_qinfo_show()
1685 int toe_entries = DIV_ROUND_UP(adap->sge.ofldqsets, 4); in sge_qinfo_show()
1686 int rdma_entries = DIV_ROUND_UP(adap->sge.rdmaqs, 4); in sge_qinfo_show()
1687 int ciq_entries = DIV_ROUND_UP(adap->sge.rdmaciqs, 4); in sge_qinfo_show()
1688 int ctrl_entries = DIV_ROUND_UP(MAX_CTRL_QUEUES, 4); in sge_qinfo_show()
1842 return DIV_ROUND_UP(adap->sge.ethqsets, 4) + in sge_queue_entries()
1843 DIV_ROUND_UP(adap->sge.ofldqsets, 4) + in sge_queue_entries()
1844 DIV_ROUND_UP(adap->sge.rdmaqs, 4) + in sge_queue_entries()
1845 DIV_ROUND_UP(adap->sge.rdmaciqs, 4) + in sge_queue_entries()
1846 DIV_ROUND_UP(MAX_CTRL_QUEUES, 4) + 1; in sge_queue_entries()
/linux-4.1.27/drivers/gpio/
Dgpio-stmpe.c164 int num_banks = DIV_ROUND_UP(stmpe->num_gpios, 8); in stmpe_gpio_irq_sync_unlock()
222 int num_banks = DIV_ROUND_UP(stmpe->num_gpios, 8); in stmpe_dbg_show_one()
300 int num_banks = DIV_ROUND_UP(stmpe->num_gpios, 8); in stmpe_gpio_irq()
Dgpio-74xx-mmio.c135 DIV_ROUND_UP(MMIO_74XX_BIT_CNT(priv->flags), 8), in mmio_74xx_gpio_probe()
/linux-4.1.27/drivers/pinctrl/mvebu/
Dpinctrl-armada-xp.c402 nregs = DIV_ROUND_UP(soc->nmodes, MVEBU_MPPS_PER_REG); in armada_xp_pinctrl_suspend()
416 nregs = DIV_ROUND_UP(soc->nmodes, MVEBU_MPPS_PER_REG); in armada_xp_pinctrl_resume()
478 nregs = DIV_ROUND_UP(soc->nmodes, MVEBU_MPPS_PER_REG); in armada_xp_pinctrl_probe()
/linux-4.1.27/drivers/hwmon/
Dpwm-fan.c50 duty = DIV_ROUND_UP(pwm * (ctx->pwm->period - 1), MAX_PWM); in __set_pwm()
312 duty = DIV_ROUND_UP(ctx->pwm_value * (ctx->pwm->period - 1), MAX_PWM); in pwm_fan_resume()
/linux-4.1.27/drivers/misc/sgi-gru/
Dgruhandles.h74 #define GRU_DS_BYTES_TO_AU(n) DIV_ROUND_UP(n, GRU_DSR_AU_BYTES)
75 #define GRU_CB_COUNT_TO_AU(n) DIV_ROUND_UP(n, GRU_CBR_AU_SIZE)
/linux-4.1.27/drivers/gpu/drm/vgem/
Dvgem_drv.c101 num_pages = DIV_ROUND_UP(obj->base.size, PAGE_SIZE); in vgem_gem_fault()
177 uint64_t pitch = args->width * DIV_ROUND_UP(args->bpp, 8); in vgem_gem_dumb_create()
/linux-4.1.27/arch/blackfin/include/asm/
Dgpio.h15 #define GPIO_BANK_NUM DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, GPIO_BANKSIZE)
/linux-4.1.27/drivers/pinctrl/spear/
Dpinctrl-plgpio.c368 regs_count = DIV_ROUND_UP(count, MAX_GPIO_PER_REG); in plgpio_irq_handler()
545 DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG), in plgpio_probe()
621 int i, reg_count = DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG); in plgpio_suspend()
660 int i, reg_count = DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG); in plgpio_resume()
/linux-4.1.27/drivers/media/pci/pt3/
Dpt3.h78 #define MAX_DESC_BUFS DIV_ROUND_UP(MAX_NUM_XFERS, DESCS_IN_PAGE)
Dpt3_dma.c181 DIV_ROUND_UP(adap->num_bufs * DATA_BUF_XFERS, DESCS_IN_PAGE); in pt3_alloc_dmabuf()
/linux-4.1.27/drivers/net/ethernet/ti/
Dcpsw_ale.h85 #define ALE_ENTRY_WORDS DIV_ROUND_UP(ALE_ENTRY_BITS, 32)
/linux-4.1.27/drivers/gpu/drm/
Ddrm_gem_cma_helper.c223 unsigned int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in drm_gem_cma_dumb_create_internal()
262 args->pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in drm_gem_cma_dumb_create()
/linux-4.1.27/drivers/md/bcache/
Dmovinggc.c88 bio->bi_max_vecs = DIV_ROUND_UP(KEY_SIZE(&io->w->key), in moving_init()
152 * DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS), in read_moving()
Dwriteback.c115 bio->bi_max_vecs = DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS); in dirty_init()
247 * DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS), in read_dirty()
/linux-4.1.27/drivers/media/platform/omap3isp/
Dispcsiphy.c224 reg |= (DIV_ROUND_UP(25 * csi2_ddrclk_khz, 2000000) - 1) in omap3isp_csiphy_config()
227 reg |= (DIV_ROUND_UP(90 * csi2_ddrclk_khz, 1000000) + 3) in omap3isp_csiphy_config()
/linux-4.1.27/drivers/net/wireless/ath/ath5k/
Dpcu.c147 bitrate = DIV_ROUND_UP(bitrate, 2); in ath5k_hw_get_frame_duration()
153 bitrate = DIV_ROUND_UP(bitrate, 4); in ath5k_hw_get_frame_duration()
163 symbols = DIV_ROUND_UP(bits * 10, symbol_bits); in ath5k_hw_get_frame_duration()
/linux-4.1.27/drivers/regulator/
Dtwl-regulator.c500 int vsel = DIV_ROUND_UP(min_uV - 600000, 12500); in twl4030smps_set_voltage()
738 vsel = DIV_ROUND_UP(min_uV - 600000, 12500); in twl6030smps_map_voltage()
761 vsel = DIV_ROUND_UP(min_uV - 700000, 12500); in twl6030smps_map_voltage()
784 vsel = DIV_ROUND_UP(min_uV - 1852000, 38600); in twl6030smps_map_voltage()
792 vsel = DIV_ROUND_UP(min_uV - 2161000, 38600); in twl6030smps_map_voltage()
Dhelpers.c262 ret = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step); in regulator_map_voltage_linear()
316 ret = DIV_ROUND_UP(min_uV - range->min_uV, in regulator_map_voltage_linear_range()
Dda9052-regulator.c200 DIV_ROUND_UP(min_uV - DA9052_CONST_3uV, in da9052_map_voltage()
203 sel = DIV_ROUND_UP(min_uV - info->min_uV, info->step_uV); in da9052_map_voltage()
Drc5t583-regulator.c61 return DIV_ROUND_UP(curr_uV, reg->reg_info->enable_uv_per_us); in rc5t583_regulator_enable_time()
Dmax8649.c82 return DIV_ROUND_UP(voltage, rate); in max8649_enable_time()
Dda903x.c206 sel = DIV_ROUND_UP(thresh - min_uV, info->desc.uV_step); in da9030_map_ldo14_voltage()
209 sel = DIV_ROUND_UP(min_uV - thresh, info->desc.uV_step); in da9030_map_ldo14_voltage()
Dad5398.c100 selector = DIV_ROUND_UP((min_uA - chip->min_uA) * chip->current_level, in ad5398_set_current_limit()
Darizona-ldo1.c56 sel = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step); in arizona_ldo1_hc_map_voltage()
/linux-4.1.27/fs/nfs/
Dnfs4session.h32 #define SLOT_TABLE_SZ DIV_ROUND_UP(NFS4_MAX_SLOT_TABLE, 8*sizeof(long))
/linux-4.1.27/drivers/phy/
Dphy-qcom-ufs-i.h40 usleep_range(DIV_ROUND_UP(sleep_us, 4), sleep_us); \
/linux-4.1.27/tools/perf/util/include/linux/
Dkernel.h9 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) macro
/linux-4.1.27/drivers/mfd/
Dpm8921-core.c329 chip->num_blocks = DIV_ROUND_UP(chip->num_irqs, 8); in pm8921_probe()
330 chip->num_masters = DIV_ROUND_UP(chip->num_blocks, 8); in pm8921_probe()
Dtwl4030-irq.c97 .bytes_ixr = DIV_ROUND_UP(nbits, 8), \
99 .bytes_edr = DIV_ROUND_UP((2*(nbits)), 8), \
/linux-4.1.27/drivers/clocksource/
Dtimer-sun5i.c248 ce->timer.ticks_per_jiffy = DIV_ROUND_UP(ndata->new_rate, HZ); in sun5i_rate_cb_clkevt()
275 ce->timer.ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); in sun5i_setup_clockevent()
Dtimer-keystone.c210 timer.hz_period = DIV_ROUND_UP(rate, HZ); in keystone_timer_init()
Dsun4i_timer.c185 ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); in sun4i_timer_init()
Dtimer-digicolor.c177 dc_timer_dev.ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); in digicolor_timer_init()
Dmtk_timer.c235 evt->ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); in mtk_timer_init()
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb4vf/
Dt4vf_hw.c381 len16 = DIV_ROUND_UP(offsetof(struct fw_params_cmd, in t4vf_query_params()
419 len16 = DIV_ROUND_UP(offsetof(struct fw_params_cmd, in t4vf_set_params()
1205 size_t len16 = DIV_ROUND_UP(offsetof(struct fw_vi_mac_cmd, in t4vf_alloc_mac_filt()
1286 size_t len16 = DIV_ROUND_UP(offsetof(struct fw_vi_mac_cmd, in t4vf_change_mac()
1333 size_t len16 = DIV_ROUND_UP(offsetof(struct fw_vi_mac_cmd, in t4vf_set_addr_hash()
1375 size_t len16 = DIV_ROUND_UP(len, 16); in t4vf_get_port_stats()
/linux-4.1.27/kernel/power/
Dsnapshot.c445 nr_blocks = DIV_ROUND_UP(pages, BM_BITS_PER_BLOCK); in create_zone_bm_rtree()
1045 rtree = nodes = DIV_ROUND_UP(zone->spanned_pages, BM_BITS_PER_BLOCK); in snapshot_additional_pages()
1046 rtree += DIV_ROUND_UP(rtree * sizeof(struct rtree_node), in snapshot_additional_pages()
1049 nodes = DIV_ROUND_UP(nodes, BM_ENTRIES_PER_LEVEL); in snapshot_additional_pages()
1609 - 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE); in hibernate_preallocate_memory()
1611 size = DIV_ROUND_UP(image_size, PAGE_SIZE); in hibernate_preallocate_memory()
1872 nr_meta_pages = DIV_ROUND_UP(nr_pages * sizeof(long), PAGE_SIZE); in swsusp_save()
2369 nr_pages = DIV_ROUND_UP(nr_pages, PBES_PER_LINKED_PAGE); in prepare_image()
/linux-4.1.27/arch/m68k/mm/
Dinit.c127 #define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), 1024) in print_memmap()
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
Dgk20a.c357 n_lo = DIV_ROUND_UP(m_old * priv->params->min_vco, in _gk20a_pllg_program_mnp()
390 n_lo = DIV_ROUND_UP(priv->m * priv->params->min_vco, in _gk20a_pllg_program_mnp()
448 n_lo = DIV_ROUND_UP(m * priv->params->min_vco, in gk20a_pllg_disable()
/linux-4.1.27/arch/metag/mm/
Dmmu-meta2.c139 unsigned int pages = DIV_ROUND_UP(mem_size, 1 << 22); in mmu_init()
/linux-4.1.27/drivers/gpu/drm/amd/amdkfd/
Dkfd_priv.h153 unsigned long doorbell_available_index[DIV_ROUND_UP(
476 …unsigned long allocated_queue_bitmap[DIV_ROUND_UP(KFD_MAX_NUM_OF_QUEUES_PER_PROCESS, BITS_PER_LONG…
/linux-4.1.27/sound/usb/
Dendpoint.c690 max_packs_per_period = DIV_ROUND_UP(period_bytes, minsize); in data_ep_set_params()
693 urbs_per_period = DIV_ROUND_UP(max_packs_per_period, in data_ep_set_params()
696 urb_packs = DIV_ROUND_UP(max_packs_per_period, urbs_per_period); in data_ep_set_params()
699 ep->max_urb_frames = DIV_ROUND_UP(frames_per_period, in data_ep_set_params()
/linux-4.1.27/net/dccp/ccids/
Dccid2.c88 u32 max_ratio = DIV_ROUND_UP(ccid2_hc_tx_sk(sk)->tx_cwnd, 2); in ccid2_change_l_ack_ratio()
578 maxincr = DIV_ROUND_UP(dp->dccps_l_ack_ratio, 2); in ccid2_hc_tx_packet_recv()
724 max_ratio = DIV_ROUND_UP(hc->tx_cwnd, 2); in ccid2_hc_tx_init()
/linux-4.1.27/drivers/scsi/fnic/
Dvnic_wq.h82 DIV_ROUND_UP(entries, VNIC_WQ_BUF_BLK_ENTRIES)
Dvnic_rq.h79 DIV_ROUND_UP(entries, VNIC_RQ_BUF_BLK_ENTRIES)
/linux-4.1.27/drivers/staging/iio/light/
Disl29028.c88 unsigned int period = DIV_ROUND_UP(1000, sampling); in isl29028_set_proxim_sampling()
111 mdelay(DIV_ROUND_UP(1000, chip->prox_sampling)); in isl29028_enable_proximity()
/linux-4.1.27/drivers/iio/adc/
Dad_sigma_delta.c280 DIV_ROUND_UP(chan->scan_type.realbits + chan->scan_type.shift, 8), in ad_sigma_delta_single_conversion()
373 reg_size = DIV_ROUND_UP(reg_size, 8); in ad_sd_trigger_handler()
/linux-4.1.27/drivers/video/fbdev/
Dclps711x-fb.c83 val = DIV_ROUND_UP(var->xres, 16) - 1; in clps711x_fb_check_var()
87 val = DIV_ROUND_UP(var->yres * var->xres * var->bits_per_pixel, 128); in clps711x_fb_check_var()
/linux-4.1.27/drivers/misc/vmw_vmci/
Dvmci_queue_pair.c263 (DIV_ROUND_UP(_QPE.produce_size, PAGE_SIZE) + \
264 DIV_ROUND_UP(_QPE.consume_size, PAGE_SIZE) + 2))
279 for (i = 0; i < DIV_ROUND_UP(size, PAGE_SIZE) + 1; i++) { in qp_free_queue()
301 const u64 num_pages = DIV_ROUND_UP(size, PAGE_SIZE) + 1; in qp_alloc_queue()
627 const u64 num_pages = DIV_ROUND_UP(size, PAGE_SIZE) + 1; in qp_host_alloc_queue()
975 const u64 num_ppns = DIV_ROUND_UP(produce_size, PAGE_SIZE) + in qp_guest_endpoint_create()
976 DIV_ROUND_UP(consume_size, PAGE_SIZE) + 2; in qp_guest_endpoint_create()
1187 DIV_ROUND_UP(produce_size, PAGE_SIZE) + 1; in qp_alloc_guest_work()
1189 DIV_ROUND_UP(consume_size, PAGE_SIZE) + 1; in qp_alloc_guest_work()
1468 (DIV_ROUND_UP(entry->qp.produce_size, PAGE_SIZE) + 1); in qp_broker_create()
/linux-4.1.27/fs/minix/
Dminix.h92 return DIV_ROUND_UP(bits, blocksize * 8); in minix_blocks_needed()
/linux-4.1.27/mm/
Dswap_cgroup.c153 length = DIV_ROUND_UP(max_pages, SC_PER_PAGE); in swap_cgroup_swapon()
Dcma_debug.c188 u32s = DIV_ROUND_UP(cma_bitmap_maxno(cma), BITS_PER_BYTE * sizeof(u32)); in cma_debugfs_add_one()
/linux-4.1.27/fs/btrfs/
Dordered-data.h152 int num_sectors = (int)DIV_ROUND_UP(bytes, root->sectorsize); in btrfs_ordered_sum_size()
Dcompression.c94 (DIV_ROUND_UP(disk_size, root->sectorsize)) * csum_size; in compressed_bio_size()
624 nr_pages = DIV_ROUND_UP(compressed_len, PAGE_CACHE_SIZE); in btrfs_submit_compressed_read()
695 sums += DIV_ROUND_UP(comp_bio->bi_iter.bi_size, in btrfs_submit_compressed_read()
Draid56.c941 return DIV_ROUND_UP(nr, PAGE_CACHE_SIZE); in rbio_nr_pages()
955 int stripe_npages = DIV_ROUND_UP(stripe_len, PAGE_SIZE); in alloc_rbio()
959 DIV_ROUND_UP(stripe_npages, BITS_PER_LONG / 8), in alloc_rbio()
1502 int nr_pages = DIV_ROUND_UP(rbio->stripe_len, PAGE_CACHE_SIZE); in raid56_rmw_stripe()
1798 int nr_pages = DIV_ROUND_UP(rbio->stripe_len, PAGE_CACHE_SIZE); in __raid_recover_end_io()
2023 int nr_pages = DIV_ROUND_UP(rbio->stripe_len, PAGE_CACHE_SIZE); in __raid56_parity_recover()
/linux-4.1.27/arch/x86/kernel/
Despfix_64.c70 #define ESPFIX_MAX_PAGES DIV_ROUND_UP(CONFIG_NR_CPUS, ESPFIX_STACKS_PER_PAGE)
/linux-4.1.27/drivers/net/wireless/ath/ath9k/
Dcommon-beacon.c99 bs->bs_bmissthreshold = DIV_ROUND_UP(conf->bmiss_timeout, conf->intval); in ath9k_cmn_beacon_config_sta()
/linux-4.1.27/net/netfilter/
Dnft_bitwise.c37 for (i = 0; i < DIV_ROUND_UP(priv->len, 4); i++) in nft_bitwise_eval()
/linux-4.1.27/sound/soc/codecs/
Dpcm512x.c514 ranges[1].min = DIV_ROUND_UP(16000000, frame_size); in pcm512x_hw_rule_rate()
715 num *= DIV_ROUND_UP(pllin_rate / den, 20000000); in pcm512x_find_pll_coeff()
716 den *= DIV_ROUND_UP(pllin_rate / den, 20000000); in pcm512x_find_pll_coeff()
772 P = DIV_ROUND_UP(pllin_rate, 20000000); in pcm512x_find_pll_coeff()
1020 ncp_div = DIV_ROUND_UP(dac_rate, 2048000); in pcm512x_set_dividers()
/linux-4.1.27/net/mac80211/
Drc80211_minstrel.c448 DIV_ROUND_UP(rate->bitrate, 1 << shift), erp, 1, in calc_rate_durations()
451 DIV_ROUND_UP(rate->bitrate, 1 << shift), erp, 1, in calc_rate_durations()
520 mr->bitrate = DIV_ROUND_UP(sband->bitrates[i].bitrate, in minstrel_rate_init()
Dutil.c155 dur += 4 * DIV_ROUND_UP((16 + 8 * (len + 4) + 6) * 10, in ieee80211_frame_duration()
171 dur += DIV_ROUND_UP(8 * (len + 4) * 10, rate); in ieee80211_frame_duration()
232 bitrate = DIV_ROUND_UP(rate->bitrate, 1 << shift); in ieee80211_rts_duration()
275 bitrate = DIV_ROUND_UP(rate->bitrate, 1 << shift); in ieee80211_ctstoself_duration()
1384 (u8) DIV_ROUND_UP(sband->bitrates[i].bitrate, in ieee80211_build_preq_ies_band()
1670 brate = DIV_ROUND_UP(sband->bitrates[j].bitrate, in ieee80211_sta_get_rates()
2463 brate = DIV_ROUND_UP(br->bitrate, (1 << shift) * 5); in ieee80211_parse_bitrates()
2511 rate = DIV_ROUND_UP(sband->bitrates[i].bitrate, in ieee80211_add_srates_ie()
2560 rate = DIV_ROUND_UP(sband->bitrates[i].bitrate, in ieee80211_add_ext_srates_ie()
2663 ri.legacy = DIV_ROUND_UP(bitrate, (1 << shift)); in ieee80211_calculate_rx_timestamp()
[all …]
/linux-4.1.27/drivers/net/ethernet/cisco/enic/
Dvnic_wq.h77 DIV_ROUND_UP(entries, VNIC_WQ_BUF_BLK_ENTRIES(entries))
/linux-4.1.27/drivers/mtd/nand/
Dtxx9ndfmc.c256 DIV_ROUND_UP((ns) * DIV_ROUND_UP(gbusclk, 1000), 1000000)
Dsunxi_nand.c845 min_clk_period = DIV_ROUND_UP(timings->tRR_min, 3); in sunxi_nand_chip_set_timings()
861 min_clk_period = DIV_ROUND_UP(timings->tRC_min, 2); in sunxi_nand_chip_set_timings()
865 min_clk_period = DIV_ROUND_UP(timings->tWC_min, 2); in sunxi_nand_chip_set_timings()
869 min_clk_period = DIV_ROUND_UP(min_clk_period, 1000); in sunxi_nand_chip_set_timings()
949 ecc->bytes = DIV_ROUND_UP(ecc->strength * fls(8 * 1024), 8); in sunxi_nand_hw_common_ecc_ctrl_init()
/linux-4.1.27/drivers/scsi/csiostor/
Dcsio_scsi.c213 DIV_ROUND_UP(size, 16))); in csio_scsi_init_cmd_wr()
373 FW_WR_LEN16_V(DIV_ROUND_UP(size, 16))); in csio_scsi_init_read_wr()
426 FW_WR_LEN16_V(DIV_ROUND_UP(size, 16))); in csio_scsi_init_write_wr()
656 DIV_ROUND_UP(size, 16))); in csio_scsi_init_abrt_cls_wr()
1237 int count = DIV_ROUND_UP(tmo, CSIO_SCSI_ABORT_Q_POLL_MS); in csio_scsi_abort_io_q()
1277 int count = DIV_ROUND_UP(60 * 1000, CSIO_SCSI_ABORT_Q_POLL_MS); in csio_scsim_cleanup_io()
1323 int count = DIV_ROUND_UP(60 * 1000, CSIO_SCSI_ABORT_Q_POLL_MS); in csio_scsim_cleanup_io_lnode()
2138 count = DIV_ROUND_UP((ioreq->tmo + 10) * 1000, CSIO_SCSI_TM_POLL_MS); in csio_eh_lun_reset_handler()
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/volt/
Dgk20a.c98 mv = DIV_ROUND_UP(mv, 1000); in gk20a_volt_calc_voltage()
/linux-4.1.27/drivers/clk/tegra/
Dclk-divider.c104 return DIV_ROUND_UP(output_rate * mul, div + mul); in clk_frac_div_round_rate()
/linux-4.1.27/arch/arm/mach-davinci/
Daemif.c71 result = DIV_ROUND_UP((wanted * clk), NSEC_PER_MSEC) - 1; in aemif_calc_rate()
/linux-4.1.27/net/ipv6/
Dudp_offload.c53 skb_shinfo(skb)->gso_segs = DIV_ROUND_UP(skb->len, mss); in udp6_ufo_fragment()
/linux-4.1.27/drivers/usb/host/
Dxhci.c1171 unsigned int number = DIV_ROUND_UP(ep_index, 2); in xhci_get_endpoint_address()
2141 bw_reserved = DIV_ROUND_UP(SS_BW_RESERVED*SS_BW_LIMIT_IN, 100); in xhci_check_ss_bw()
2145 bw_reserved = DIV_ROUND_UP(SS_BW_RESERVED*SS_BW_LIMIT_OUT, 100); in xhci_check_ss_bw()
2214 bw_reserved = DIV_ROUND_UP(HS_BW_RESERVED * max_bandwidth, 100); in xhci_check_bw_table()
2217 bw_reserved = DIV_ROUND_UP(FS_BW_RESERVED * max_bandwidth, 100); in xhci_check_bw_table()
2251 bw_used = DIV_ROUND_UP(bw_table->interval0_esit_payload, block_size) + in xhci_check_bw_table()
2281 largest_mps = DIV_ROUND_UP( in xhci_check_bw_table()
2384 unsigned int mps = DIV_ROUND_UP(ep_bw->max_packet_size, SS_BLOCK); in xhci_get_ss_bw_consumed()
2390 return DIV_ROUND_UP(ep_bw->mult * ep_bw->num_packets * in xhci_get_ss_bw_consumed()
4313 sel = DIV_ROUND_UP(udev->u1_params.sel, 1000); in xhci_get_timeout_no_hub_lpm()
[all …]
/linux-4.1.27/drivers/gpu/drm/tegra/
Ddpaux.c77 for (i = 0; i < DIV_ROUND_UP(size, 4); i++) { in tegra_dpaux_write_fifo()
93 for (i = 0; i < DIV_ROUND_UP(size, 4); i++) { in tegra_dpaux_read_fifo()
/linux-4.1.27/arch/x86/platform/efi/
Defi_64.c91 n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT), PGDIR_SIZE); in efi_call_phys_prolog()
115 nr_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT) , PGDIR_SIZE); in efi_call_phys_epilog()
/linux-4.1.27/drivers/usb/host/whci/
Dqset.c373 std->num_pointers = DIV_ROUND_UP(ep - sp, WHCI_PAGE_SIZE); in qset_fill_page_list()
510 num_pointers = DIV_ROUND_UP(ep - sp, WHCI_PAGE_SIZE); in qset_add_urb_sg()
667 ntds_remaining = DIV_ROUND_UP(remaining, QTD_MAX_XFER_SIZE); in qset_add_urb()
/linux-4.1.27/drivers/md/
Dbitmap.c761 bytes = DIV_ROUND_UP(chunks, 8); in bitmap_storage_alloc()
765 num_pages = DIV_ROUND_UP(bytes, PAGE_SIZE); in bitmap_storage_alloc()
799 roundup(DIV_ROUND_UP(num_pages*4, 8), sizeof(unsigned long)), in bitmap_storage_alloc()
1070 node_offset = bitmap->cluster_slot * (DIV_ROUND_UP(store->bytes, PAGE_SIZE)); in bitmap_init_from_disk()
1979 bytes = DIV_ROUND_UP(bitmap->counts.chunks, 8); in bitmap_resize()
1982 space = DIV_ROUND_UP(bytes, 512); in bitmap_resize()
1991 bytes = DIV_ROUND_UP(chunks, 8); in bitmap_resize()
2008 pages = DIV_ROUND_UP(chunks, PAGE_COUNTER_RATIO); in bitmap_resize()
/linux-4.1.27/drivers/scsi/cxgbi/cxgb4i/
Dcxgb4i.c158 #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) macro
492 return DIV_ROUND_UP(skb->len, 8); in calc_tx_flits_ofld()
507 flowclen16 = DIV_ROUND_UP(flowclen, 16); in tx_flowc_wr_credits()
631 credits_needed = DIV_ROUND_UP(dlen, 16); in push_tx_frames()
633 credits_needed = DIV_ROUND_UP( in push_tx_frames()
638 credits_needed += DIV_ROUND_UP( in push_tx_frames()
1444 DIV_ROUND_UP(sizeof(struct cpl_abort_req), 16); in init_act_open()
1542 req->len16 = htonl(DIV_ROUND_UP(wr_len - sizeof(req->wr), 16)); in ulp_mem_io_set_hdr()
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/
Dfweh.h119 #define BRCMF_EVENTING_MASK_LEN DIV_ROUND_UP(BRCMF_E_LAST, 8)
/linux-4.1.27/drivers/infiniband/hw/mlx5/
Dmem.c110 *ncont = DIV_ROUND_UP(i, (1 << m)); in mlx5_ib_cont_pages()
/linux-4.1.27/drivers/input/misc/
Dgpio_tilt_polled.c154 tdev->threshold = DIV_ROUND_UP(pdata->debounce_interval, in gpio_tilt_polled_probe()
/linux-4.1.27/drivers/clk/at91/
Dclk-pll.c190 tmpdiv = DIV_ROUND_UP(parent_rate, characteristics->input.max); in clk_pll_get_best_div_mul()
202 maxdiv = DIV_ROUND_UP(parent_rate * PLL_MUL_MAX(layout), rate); in clk_pll_get_best_div_mul()
/linux-4.1.27/net/wireless/
Dlib80211_crypt_ccmp.c241 blocks = DIV_ROUND_UP(data_len, AES_BLOCK_LEN); in lib80211_ccmp_encrypt()
347 blocks = DIV_ROUND_UP(data_len, AES_BLOCK_LEN); in lib80211_ccmp_decrypt()
/linux-4.1.27/drivers/gpu/drm/rockchip/
Drockchip_drm_fbdev.c64 bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8); in rockchip_drm_fbdev_create()
Drockchip_drm_gem.c238 int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in rockchip_gem_dumb_create()
/linux-4.1.27/drivers/gpu/drm/udl/
Dudl_gem.c81 args->pitch = args->width * DIV_ROUND_UP(args->bpp, 8); in udl_dumb_create()
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/gr/
Dctxgm204.c949 const u32 dist_nr = DIV_ROUND_UP(priv->tpc_total, 4); in gm204_grctx_generate_405b60()
Dgm204.c256 const u32 magicgpc918 = DIV_ROUND_UP(0x00800000, priv->tpc_total); in gm204_gr_init()
/linux-4.1.27/drivers/media/usb/em28xx/
Dem28xx-audio.c797 bytes_per_transfer = DIV_ROUND_UP(48000 * 2 * 2, 125 * interval); in em28xx_audio_urb_init()
803 num_urb = DIV_ROUND_UP(bytes_per_transfer, ep_size); in em28xx_audio_urb_init()
821 npackets = DIV_ROUND_UP(urb_size, ep_size); in em28xx_audio_urb_init()
/linux-4.1.27/drivers/input/keyboard/
Dpmic8xxx-keypad.c157 udelay((2 * DIV_ROUND_UP(USEC_PER_SEC, KEYP_CLOCK_FREQ)) + 1); in pmic8xxx_chk_sync_read()
211 udelay((4 * DIV_ROUND_UP(USEC_PER_SEC, KEYP_CLOCK_FREQ)) + 1); in pmic8xxx_kp_read_matrix()
/linux-4.1.27/fs/pstore/
Dram_core.c237 ecc_blocks = DIV_ROUND_UP(prz->buffer_size - prz->ecc_info.ecc_size, in persistent_ram_init_ecc()
394 page_count = DIV_ROUND_UP(size + offset_in_page(start), PAGE_SIZE); in persistent_ram_vmap()
/linux-4.1.27/drivers/dma/
Dsa11x0-dma.c552 j += DIV_ROUND_UP(len, DMA_MAX_SIZE & ~DMA_ALIGN) - 1; in sa11x0_dma_prep_slave_sg()
583 unsigned mult = DIV_ROUND_UP(tlen, in sa11x0_dma_prep_slave_sg()
623 sgperiod = DIV_ROUND_UP(period, DMA_MAX_SIZE & ~DMA_ALIGN); in sa11x0_dma_prep_dma_cyclic()
643 unsigned mult = DIV_ROUND_UP(tlen, DMA_MAX_SIZE & ~DMA_ALIGN); in sa11x0_dma_prep_dma_cyclic()
/linux-4.1.27/arch/arm64/mm/
Dinit.c298 #define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), SZ_1K) in mem_init()
/linux-4.1.27/drivers/mtd/chips/
Dgen_probe.c114 mapsize = sizeof(long) * DIV_ROUND_UP(max_chips, BITS_PER_LONG); in genprobe_ident_chips()
/linux-4.1.27/drivers/net/ethernet/intel/i40evf/
Di40e_txrx.h128 #define TXD_USE_COUNT(S) DIV_ROUND_UP((S), I40E_MAX_DATA_PER_TXD)
/linux-4.1.27/sound/soc/adi/
Daxi-i2s.c96 bclk_div = DIV_ROUND_UP(clk_get_rate(i2s->clk_ref), bclk_rate) / 2 - 1; in axi_i2s_hw_params()
/linux-4.1.27/drivers/mmc/host/
Dmvsdio.c94 tmout = DIV_ROUND_UP(data->timeout_ns, host->ns_per_clk); in mvsd_setup_data()
618 u32 m = DIV_ROUND_UP(host->base_clock, ios->clock) - 1; in mvsd_set_ios()
737 mmc->f_min = DIV_ROUND_UP(host->base_clock, MVSD_BASE_DIV_MAX); in mvsd_probe()
/linux-4.1.27/fs/omfs/
Dinode.c316 bitmap_size = DIV_ROUND_UP(sbi->s_num_blocks, 8); in omfs_get_imap()
317 array_size = DIV_ROUND_UP(bitmap_size, sb->s_blocksize); in omfs_get_imap()
/linux-4.1.27/drivers/clk/qcom/
Dclk-rcg2.c449 div = DIV_ROUND_UP((2 * parent_rate), rate) - 1; in clk_byte_determine_rate()
463 div = DIV_ROUND_UP((2 * parent_rate), rate) - 1; in clk_byte_set_rate()
/linux-4.1.27/arch/arm/mach-pxa/
Dam200epd.c247 am200_fb_info.modes->yres = DIV_ROUND_UP(totalsize, fw); in am200_presetup_fb()
/linux-4.1.27/net/bridge/
Dbr_stp_bpdu.c73 return DIV_ROUND_UP(ticks * HZ, STP_HZ); in br_get_ticks()
/linux-4.1.27/drivers/net/ethernet/intel/i40e/
Di40e_txrx.h128 #define TXD_USE_COUNT(S) DIV_ROUND_UP((S), I40E_MAX_DATA_PER_TXD)
/linux-4.1.27/arch/nios2/kernel/
Dtime.c173 period = DIV_ROUND_UP(timer->freq, HZ); in nios2_timer_set_mode()

1234