| /linux/drivers/clk/rockchip/ |
| H A D | clk-half-divider.c | 32 return DIV_ROUND_UP_ULL(((u64)parent_rate * 2), val); in clk_half_divider_recalc_rate() 50 bestdiv = DIV_ROUND_UP_ULL(((u64)parent_rate * 2), rate); in clk_half_divider_bestdiv() 77 now = DIV_ROUND_UP_ULL(((u64)parent_rate * 2), in clk_half_divider_bestdiv() 105 req->rate = DIV_ROUND_UP_ULL(((u64)req->best_parent_rate * 2), div * 2 + 3); in clk_half_divider_determine_rate() 118 value = DIV_ROUND_UP_ULL(((u64)parent_rate * 2), rate); in clk_half_divider_set_rate()
|
| /linux/drivers/clk/zynqmp/ |
| H A D | divider.c | 56 up = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in zynqmp_divider_get_val() 62 up_rate = DIV_ROUND_UP_ULL((u64)parent_rate, up); in zynqmp_divider_get_val() 63 down_rate = DIV_ROUND_UP_ULL((u64)parent_rate, down); in zynqmp_divider_get_val() 110 return DIV_ROUND_UP_ULL(parent_rate, value); in zynqmp_clk_divider_recalc_rate() 147 req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, bestdiv); in zynqmp_clk_divider_determine_rate()
|
| /linux/drivers/clk/ |
| H A D | clk-divider.c | 151 return DIV_ROUND_UP_ULL((u64)parent_rate, div); in divider_recalc_rate() 229 int div = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in _div_round_up() 246 up = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in _div_round_closest() 257 up_rate = DIV_ROUND_UP_ULL((u64)parent_rate, up); in _div_round_closest() 258 down_rate = DIV_ROUND_UP_ULL((u64)parent_rate, down); in _div_round_closest() 336 now = DIV_ROUND_UP_ULL((u64)parent_rate, i); in clk_divider_bestdiv() 361 req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); in divider_determine_rate() 384 req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); in divider_ro_determine_rate() 461 div = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in divider_get_val()
|
| /linux/drivers/gpu/drm/i915/display/ |
| H A D | intel_fixed.h | 80 tmp = DIV_ROUND_UP_ULL(tmp, 1 << 16); in mul_round_up_u32_fixed16() 102 tmp = DIV_ROUND_UP_ULL(tmp, d); in div_fixed16() 112 tmp = DIV_ROUND_UP_ULL(tmp, d.val); in div_round_up_u32_fixed16()
|
| /linux/include/linux/ |
| H A D | math.h | 54 #define DIV_ROUND_UP_ULL(ll, d) \ macro 58 # define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d)
|
| /linux/drivers/i2c/busses/ |
| H A D | i2c-hisi.c | 88 DIV_ROUND_UP_ULL((clk_rate_khz) * (ns), NSEC_PER_MSEC) 397 total_cnt = DIV_ROUND_UP_ULL(ctlr->clk_rate_khz * HZ_PER_KHZ, ctlr->t.bus_freq_hz); in hisi_i2c_set_scl() 399 t_scl_hcnt = DIV_ROUND_UP_ULL(total_cnt * divide, divisor); in hisi_i2c_set_scl() 496 ctlr->clk_rate_khz = DIV_ROUND_UP_ULL(clk_rate_hz, HZ_PER_KHZ); in hisi_i2c_probe()
|
| /linux/drivers/pwm/ |
| H A D | pwm-keembay.c | 112 state->duty_cycle = DIV_ROUND_UP_ULL(high, clk_rate); in keembay_pwm_get_state() 113 state->period = DIV_ROUND_UP_ULL(high + low, clk_rate); in keembay_pwm_get_state()
|
| H A D | pwm-sophgo-sg2042.c | 136 state->period = DIV_ROUND_UP_ULL((u64)period_ticks * NSEC_PER_SEC, ddata->clk_rate_hz); in pwm_sg2042_get_state() 137 state->duty_cycle = DIV_ROUND_UP_ULL((u64)hlperiod_ticks * NSEC_PER_SEC, ddata->clk_rate_hz); in pwm_sg2042_get_state()
|
| H A D | pwm-sun4i.c | 129 state->period = DIV_ROUND_UP_ULL(NSEC_PER_SEC, clk_rate); in sun4i_pwm_get_state() 130 state->duty_cycle = DIV_ROUND_UP_ULL(state->period, 2); in sun4i_pwm_get_state() 300 delay_us = DIV_ROUND_UP_ULL(cstate.period, NSEC_PER_USEC); in sun4i_pwm_apply()
|
| H A D | pwm-sifive.c | 121 ddata->real_period = DIV_ROUND_UP_ULL(num, rate); in pwm_sifive_update_clock() 146 state->duty_cycle = DIV_ROUND_UP_ULL((u64)duty * ddata->real_period, in pwm_sifive_get_state()
|
| H A D | pwm-crc.c | 147 DIV_ROUND_UP_ULL(duty_cycle_reg * state->period, PWM_MAX_LEVEL); in crc_pwm_get_state()
|
| H A D | pwm-sl28cpld.c | 142 prescaler = DIV_ROUND_UP_ULL(SL28CPLD_PWM_PERIOD(0), state->period); in sl28cpld_pwm_apply()
|
| H A D | pwm-rz-mtu3.c | 299 state->period = DIV_ROUND_UP_ULL(tmp, rz_mtu3_pwm->rate); in rz_mtu3_pwm_get_state() 301 state->duty_cycle = DIV_ROUND_UP_ULL(tmp, rz_mtu3_pwm->rate); in rz_mtu3_pwm_get_state()
|
| H A D | pwm-tegra.c | 144 required_clk_rate = DIV_ROUND_UP_ULL((u64)NSEC_PER_SEC << PWM_DUTY_WIDTH, in tegra_pwm_config()
|
| /linux/drivers/gpu/drm/i915/ |
| H A D | i915_scatterlist.c | 100 if (WARN_ON(overflows_type(DIV_ROUND_UP_ULL(node->size, segment_pages), in i915_rsgt_from_mm_node() 106 if (sg_alloc_table(st, DIV_ROUND_UP_ULL(node->size, segment_pages), in i915_rsgt_from_mm_node()
|
| /linux/drivers/clk/ti/ |
| H A D | fapll.c | 350 return DIV_ROUND_UP_ULL(rate, synth_div_m); in ti_fapll_synth_recalc_rate() 373 post_div_m = DIV_ROUND_UP_ULL((u64)parent_rate * SYNTH_PHASE_K, rate); in ti_fapll_synth_set_frac_rate() 381 synth_int_div = DIV_ROUND_UP_ULL((u64)parent_rate * in ti_fapll_synth_set_frac_rate() 431 r = DIV_ROUND_UP_ULL(r, SYNTH_MAX_INT_DIV * SYNTH_MAX_DIV_M); in ti_fapll_synth_determine_rate()
|
| /linux/arch/arm/mach-omap2/ |
| H A D | timer.c | 155 arch_timer_freq = DIV_ROUND_UP_ULL(rate * num, den); in realtime_counter_init()
|
| /linux/net/ceph/ |
| H A D | striper.c | 231 *num_file_extents = DIV_ROUND_UP_ULL(objoff + objlen, l->stripe_unit) - in ceph_extent_to_file() 274 DIV_ROUND_UP_ULL(remainder_bytes, l->stripe_unit); in ceph_get_num_objects()
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
| H A D | dm.c | 147 u32 num_blocks = DIV_ROUND_UP_ULL(length, MLX5_SW_ICM_BLOCK_SIZE(dev)); in mlx5_dm_sw_icm_alloc() 250 u32 num_blocks = DIV_ROUND_UP_ULL(length, MLX5_SW_ICM_BLOCK_SIZE(dev)); in mlx5_dm_sw_icm_dealloc()
|
| /linux/drivers/clk/mstar/ |
| H A D | clk-msc313-cpupll.c | 132 return DIV_ROUND_UP_ULL(prescaled, rate); in msc313_cpupll_regforfrequecy()
|
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_pm.c | 919 vram_total_mb += DIV_ROUND_UP_ULL(man->size, 1024 * 1024); in xe_pm_set_vram_threshold() 957 total_vram_used_mb += DIV_ROUND_UP_ULL(vram_used, 1024 * 1024); in xe_pm_d3cold_allowed_toggle()
|
| /linux/drivers/peci/controller/ |
| H A D | peci-aspeed.c | 370 req->rate = DIV_ROUND_UP_ULL(req->best_parent_rate, div); in clk_aspeed_peci_determine_rate() 394 return DIV_ROUND_UP_ULL(prate, div); in clk_aspeed_peci_recalc_rate()
|
| /linux/drivers/mmc/host/ |
| H A D | sdhci-of-sparx5.c | 178 extra = DIV_ROUND_UP_ULL(dma_get_required_mask(&pdev->dev), SZ_128M); in sdhci_sparx5_probe()
|
| /linux/drivers/clk/nxp/ |
| H A D | clk-lpc18xx-cgu.c | 383 m = DIV_ROUND_UP_ULL(req->best_parent_rate, req->rate * 2); in lpc18xx_pll0_determine_rate() 406 m = DIV_ROUND_UP_ULL(parent_rate, rate * 2); in lpc18xx_pll0_set_rate()
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_rect.c | 72 return DIV_ROUND_UP_ULL(tmp, dst); in clip_scaled()
|