Home
last modified time | relevance | path

Searched refs:DIV_ROUND_UP_ULL (Results 1 – 25 of 111) sorted by relevance

12345

/openbmc/linux/drivers/clk/rockchip/
H A Dclk-half-divider.c32 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 return DIV_ROUND_UP_ULL(((u64)*prate * 2), div * 2 + 3); in clk_half_divider_round_rate()
116 value = DIV_ROUND_UP_ULL(((u64)parent_rate * 2), rate); in clk_half_divider_set_rate()
/openbmc/linux/drivers/gpu/drm/mcde/
H A Dmcde_clk_div.c60 div_rate = DIV_ROUND_UP_ULL(this_prate, div); in mcde_clk_div_choose_div()
79 return DIV_ROUND_UP_ULL(*prate, div); in mcde_clk_div_round_rate()
96 return DIV_ROUND_UP_ULL(prate, 2); in mcde_clk_div_recalc_rate()
106 return DIV_ROUND_UP_ULL(prate, div); in mcde_clk_div_recalc_rate()
/openbmc/linux/drivers/clk/zynqmp/
H A Ddivider.c56 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()
148 return DIV_ROUND_UP_ULL((u64)*prate, bestdiv); in zynqmp_clk_divider_round_rate()
/openbmc/linux/drivers/gpu/drm/i915/
H A Di915_fixed.h80 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()
H A Di915_scatterlist.c100 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()
/openbmc/linux/drivers/clk/
H A Dclk-divider.c145 return DIV_ROUND_UP_ULL((u64)parent_rate, div); in divider_recalc_rate()
223 int div = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in _div_round_up()
240 up = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in _div_round_closest()
251 up_rate = DIV_ROUND_UP_ULL((u64)parent_rate, up); in _div_round_closest()
252 down_rate = DIV_ROUND_UP_ULL((u64)parent_rate, down); in _div_round_closest()
330 now = DIV_ROUND_UP_ULL((u64)parent_rate, i); in clk_divider_bestdiv()
355 req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); in divider_determine_rate()
378 req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); in divider_ro_determine_rate()
476 div = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in divider_get_val()
/openbmc/linux/drivers/clk/meson/
H A Dsclk-div.c82 now = DIV_ROUND_UP_ULL((u64)parent_now, i); in sclk_div_bestdiv()
107 req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); in sclk_div_determine_rate()
188 return DIV_ROUND_UP_ULL((u64)prate, sclk->cached_div); in sclk_div_recalc_rate()
H A Dclk-mpll.c40 return DIV_ROUND_UP_ULL((u64)parent_rate * SDM_DEN, divisor); in rate_from_params()
57 *sdm = DIV_ROUND_UP_ULL(frac, requested_rate); in params_from_rate()
H A Dvid-pll-div.c89 return DIV_ROUND_UP_ULL(parent_rate * div->multiplier, div->divider); in meson_vid_pll_div_recalc_rate()
H A Dclk-pll.c64 rate += DIV_ROUND_UP_ULL(frac_rate, in __pll_params_to_rate()
68 return DIV_ROUND_UP_ULL(rate, n); in __pll_params_to_rate()
/openbmc/linux/include/linux/
H A Dmath.h42 #define DIV_ROUND_UP_ULL(ll, d) \ macro
46 # define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d)
/openbmc/linux/drivers/pwm/
H A Dpwm-imx27.c158 state->period = DIV_ROUND_UP_ULL(tmp, pwm_clk); in pwm_imx27_get_state()
170 state->duty_cycle = DIV_ROUND_UP_ULL(tmp, pwm_clk); in pwm_imx27_get_state()
207 period_ms = DIV_ROUND_UP_ULL(pwm_get_period(pwm), in pwm_imx27_wait_fifo_slot()
H A Dpwm-keembay.c113 state->duty_cycle = DIV_ROUND_UP_ULL(high, clk_rate); in keembay_pwm_get_state()
114 state->period = DIV_ROUND_UP_ULL(high + low, clk_rate); in keembay_pwm_get_state()
H A Dpwm-sun4i.c132 state->period = DIV_ROUND_UP_ULL(NSEC_PER_SEC, clk_rate); in sun4i_pwm_get_state()
133 state->duty_cycle = DIV_ROUND_UP_ULL(state->period, 2); in sun4i_pwm_get_state()
307 delay_us = DIV_ROUND_UP_ULL(cstate.period, NSEC_PER_USEC); in sun4i_pwm_apply()
/openbmc/linux/drivers/i2c/busses/
H A Di2c-hisi.c86 DIV_ROUND_UP_ULL((clk_rate_khz) * (ns), NSEC_PER_MSEC)
386 total_cnt = DIV_ROUND_UP_ULL(ctlr->clk_rate_khz * HZ_PER_KHZ, ctlr->t.bus_freq_hz); in hisi_i2c_set_scl()
388 t_scl_hcnt = DIV_ROUND_UP_ULL(total_cnt * divide, divisor); in hisi_i2c_set_scl()
485 ctlr->clk_rate_khz = DIV_ROUND_UP_ULL(clk_rate_hz, HZ_PER_KHZ); in hisi_i2c_probe()
/openbmc/linux/arch/arm/mach-omap2/
H A Dtimer.c155 arch_timer_freq = DIV_ROUND_UP_ULL(rate * num, den); in realtime_counter_init()
/openbmc/linux/drivers/clk/ti/
H A Dfapll.c347 return DIV_ROUND_UP_ULL(rate, synth_div_m); in ti_fapll_synth_recalc_rate()
370 post_div_m = DIV_ROUND_UP_ULL((u64)parent_rate * SYNTH_PHASE_K, rate); in ti_fapll_synth_set_frac_rate()
378 synth_int_div = DIV_ROUND_UP_ULL((u64)parent_rate * in ti_fapll_synth_set_frac_rate()
427 r = DIV_ROUND_UP_ULL(r, SYNTH_MAX_INT_DIV * SYNTH_MAX_DIV_M); in ti_fapll_synth_round_rate()
/openbmc/linux/arch/arm/mach-ep93xx/
H A Dclock.c365 return DIV_ROUND_UP_ULL(parent_rate, psc->div[index]); in ep93xx_div_recalc_rate()
379 return DIV_ROUND_UP_ULL((u64)*parent_rate, psc->div[i]); in ep93xx_div_round_rate()
381 now = DIV_ROUND_UP_ULL((u64)*parent_rate, psc->div[i]); in ep93xx_div_round_rate()
388 best = DIV_ROUND_UP_ULL(*parent_rate, maxdiv); in ep93xx_div_round_rate()
/openbmc/linux/net/ceph/
H A Dstriper.c231 *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()
/openbmc/u-boot/include/linux/
H A Dkernel.h68 #define DIV_ROUND_UP_ULL(ll, d) DIV_ROUND_DOWN_ULL((ll) + (d) - 1, (d)) macro
71 # define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d)
/openbmc/linux/drivers/video/fbdev/omap2/omapfb/dss/
H A Dhdmi5_core.c65 v = DIV_ROUND_UP_ULL(ss_scl_high * sfr, 1000000); in hdmi_core_ddc_init()
72 v = DIV_ROUND_UP_ULL(ss_scl_low * sfr, 1000000); in hdmi_core_ddc_init()
79 v = DIV_ROUND_UP_ULL(fs_scl_high * sfr, 1000000); in hdmi_core_ddc_init()
86 v = DIV_ROUND_UP_ULL(fs_scl_low * sfr, 1000000); in hdmi_core_ddc_init()
93 v = DIV_ROUND_UP_ULL(sda_hold * sfr, 1000000); in hdmi_core_ddc_init()
/openbmc/linux/drivers/gpu/drm/omapdrm/dss/
H A Dhdmi5_core.c52 v = DIV_ROUND_UP_ULL(ss_scl_high * sfr, 1000000); in hdmi5_core_ddc_init()
59 v = DIV_ROUND_UP_ULL(ss_scl_low * sfr, 1000000); in hdmi5_core_ddc_init()
66 v = DIV_ROUND_UP_ULL(fs_scl_high * sfr, 1000000); in hdmi5_core_ddc_init()
73 v = DIV_ROUND_UP_ULL(fs_scl_low * sfr, 1000000); in hdmi5_core_ddc_init()
80 v = DIV_ROUND_UP_ULL(sda_hold * sfr, 1000000); in hdmi5_core_ddc_init()
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/
H A Ddm.c123 u32 num_blocks = DIV_ROUND_UP_ULL(length, MLX5_SW_ICM_BLOCK_SIZE(dev)); in mlx5_dm_sw_icm_alloc()
219 u32 num_blocks = DIV_ROUND_UP_ULL(length, MLX5_SW_ICM_BLOCK_SIZE(dev)); in mlx5_dm_sw_icm_dealloc()
/openbmc/linux/drivers/gpu/drm/pl111/
H A Dpl111_display.c462 div_rate = DIV_ROUND_UP_ULL(this_prate, div); in pl111_clk_div_choose_div()
481 return DIV_ROUND_UP_ULL(*prate, div); in pl111_clk_div_round_rate()
500 return DIV_ROUND_UP_ULL(prate, div); in pl111_clk_div_recalc_rate()
/openbmc/linux/drivers/clk/analogbits/
H A Dwrpll-cln28hpc.c199 c->init_r = DIV_ROUND_UP_ULL(parent_rate, MAX_POST_DIVR_FREQ); in __wrpll_update_parent_rate()

12345