/linux-6.6.21/arch/mips/ar7/ |
D | clock.c | 72 u32 mul; member 101 int *postdiv, int *mul) in approximate() argument 110 *mul = i; in approximate() 118 int *mul) in calculate() argument 125 *mul = target / tmp_gcd; in calculate() 127 if ((*mul < 1) || (*mul >= 16)) in calculate() 133 if (base / *prediv * *mul / *postdiv != target) { in calculate() 134 approximate(base, target, prediv, postdiv, mul); in calculate() 135 tmp_freq = base / *prediv * *mul / *postdiv; in calculate() 142 *prediv, *postdiv, *mul); in calculate() [all …]
|
/linux-6.6.21/drivers/clk/ |
D | clk-vt8500.c | 455 u32 mul; in wm8750_find_pll_bits() local 464 for (mul = 0; mul <= 255; mul++) { in wm8750_find_pll_bits() 465 tclk = parent_rate * (mul + 1) / ((div1 + 1) * (1 << div2)); in wm8750_find_pll_bits() 472 *multiplier = mul; in wm8750_find_pll_bits() 480 *multiplier = mul; in wm8750_find_pll_bits() 503 u32 mul; in wm8850_find_pll_bits() local 512 for (mul = 0; mul <= 127; mul++) { in wm8850_find_pll_bits() 513 tclk = parent_rate * ((mul + 1) * 2) / in wm8850_find_pll_bits() 520 *multiplier = mul; in wm8850_find_pll_bits() 528 *multiplier = mul; in wm8850_find_pll_bits() [all …]
|
D | clk-cdce706.c | 73 unsigned mul; member 170 __func__, hwd->idx, hwd->mux, hwd->mul, hwd->div); in cdce706_pll_recalc_rate() 173 if (hwd->div && hwd->mul) { in cdce706_pll_recalc_rate() 174 u64 res = (u64)parent_rate * hwd->mul; in cdce706_pll_recalc_rate() 190 unsigned long mul, div; in cdce706_pll_round_rate() local 199 &mul, &div); in cdce706_pll_round_rate() 200 hwd->mul = mul; in cdce706_pll_round_rate() 205 __func__, hwd->idx, mul, div); in cdce706_pll_round_rate() 207 res = (u64)*parent_rate * hwd->mul; in cdce706_pll_round_rate() 216 unsigned long mul = hwd->mul, div = hwd->div; in cdce706_pll_set_rate() local [all …]
|
D | clk-moxart.c | 21 unsigned int mul; in moxart_of_pll_clk_init() local 34 mul = readl(base + 0x30) >> 3 & 0x3f; in moxart_of_pll_clk_init() 43 hw = clk_hw_register_fixed_factor(NULL, name, parent_name, 0, mul, 1); in moxart_of_pll_clk_init()
|
D | clk-nomadik.c | 230 u8 mul; in pll_clk_recalc_rate() local 233 mul = (val >> 8) & 0x3FU; in pll_clk_recalc_rate() 234 mul += 2; in pll_clk_recalc_rate() 236 return (parent_rate * mul) >> div; in pll_clk_recalc_rate() 240 u8 mul; in pll_clk_recalc_rate() local 242 mul = (val >> 24) & 0x3FU; in pll_clk_recalc_rate() 243 mul += 2; in pll_clk_recalc_rate() 244 return (parent_rate * mul); in pll_clk_recalc_rate()
|
/linux-6.6.21/drivers/clk/actions/ |
D | owl-factor.c | 28 unsigned int val, unsigned int *mul, unsigned int *div) in _get_table_div_mul() argument 34 *mul = clkt->mul; in _get_table_div_mul() 51 calc_rate = parent_rate * clkt->mul; in _get_table_val() 85 try_parent_rate = rate * clkt->div / clkt->mul; in owl_clk_val_best() 89 __func__, clkt->val, clkt->mul, clkt->div, in owl_clk_val_best() 102 cur_rate = DIV_ROUND_UP(parent_rate, clkt->div) * clkt->mul; in owl_clk_val_best() 125 unsigned int val, mul = 0, div = 1; in owl_factor_helper_round_rate() local 128 _get_table_div_mul(clkt, val, &mul, &div); in owl_factor_helper_round_rate() 130 return *parent_rate * mul / div; in owl_factor_helper_round_rate() 149 u32 reg, val, mul, div; in owl_factor_helper_recalc_rate() local [all …]
|
D | owl-pll.c | 20 u32 mul; in owl_pll_calculate_mul() local 22 mul = DIV_ROUND_CLOSEST(rate, pll_hw->bfreq); in owl_pll_calculate_mul() 23 if (mul < pll_hw->min_mul) in owl_pll_calculate_mul() 24 mul = pll_hw->min_mul; in owl_pll_calculate_mul() 25 else if (mul > pll_hw->max_mul) in owl_pll_calculate_mul() 26 mul = pll_hw->max_mul; in owl_pll_calculate_mul() 28 return mul & mul_mask(pll_hw); in owl_pll_calculate_mul() 65 u32 mul; in owl_pll_round_rate() local 76 mul = owl_pll_calculate_mul(pll_hw, rate); in owl_pll_round_rate() 78 return pll_hw->bfreq * mul; in owl_pll_round_rate()
|
/linux-6.6.21/drivers/clk/tegra/ |
D | clk-utils.c | 16 int mul; in div_frac_get() local 21 mul = 1 << frac_width; in div_frac_get() 24 divider_ux1 *= mul; in div_frac_get() 32 divider_ux1 *= mul; in div_frac_get() 34 if (divider_ux1 < mul) in div_frac_get() 37 divider_ux1 -= mul; in div_frac_get()
|
D | clk-divider.c | 40 int div, mul; in clk_frac_div_recalc_rate() local 51 mul = get_mul(divider); in clk_frac_div_recalc_rate() 52 div += mul; in clk_frac_div_recalc_rate() 54 rate *= mul; in clk_frac_div_recalc_rate() 65 int div, mul; in clk_frac_div_round_rate() local 75 mul = get_mul(divider); in clk_frac_div_round_rate() 77 return DIV_ROUND_UP(output_rate * mul, div + mul); in clk_frac_div_round_rate()
|
D | clk-periph-fixed.c | 57 rate = (unsigned long long)parent_rate * fixed->mul; in tegra_clk_periph_fixed_recalc_rate() 74 unsigned int mul, in tegra_clk_register_periph_fixed() argument 99 fixed->mul = mul; in tegra_clk_register_periph_fixed()
|
/linux-6.6.21/drivers/clk/at91/ |
D | clk-pll.c | 40 u16 mul; member 69 u16 mul; in clk_pll_prepare() local 73 mul = PLL_MUL(pllr, layout); in clk_pll_prepare() 77 (div == pll->div && mul == pll->mul)) in clk_pll_prepare() 90 ((pll->mul & layout->mul_mask) << layout->mul_shift)); in clk_pll_prepare() 118 if (!pll->div || !pll->mul) in clk_pll_recalc_rate() 121 return (parent_rate / pll->div) * (pll->mul + 1); in clk_pll_recalc_rate() 126 u32 *div, u32 *mul, in clk_pll_get_best_div_mul() argument 226 if (mul) in clk_pll_get_best_div_mul() 227 *mul = bestmul - 1; in clk_pll_get_best_div_mul() [all …]
|
/linux-6.6.21/drivers/cpufreq/ |
D | cpufreq-nforce2.c | 25 #define NFORCE2_PLL(mul, div) (0x100000 | (mul << 8) | div) argument 69 unsigned char mul, div; in nforce2_calc_fsb() local 71 mul = (pll >> 8) & 0xff; in nforce2_calc_fsb() 75 return NFORCE2_XTAL * mul / div; in nforce2_calc_fsb() 89 unsigned char mul = 0, div = 0; in nforce2_calc_pll() local 93 while (((mul == 0) || (div == 0)) && (tried <= 3)) { in nforce2_calc_pll() 98 mul = xmul; in nforce2_calc_pll() 104 if ((mul == 0) || (div == 0)) in nforce2_calc_pll() 107 return NFORCE2_PLL(mul, div); in nforce2_calc_pll()
|
/linux-6.6.21/include/linux/ |
D | math64.h | 164 static __always_inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift) in mul_u64_u32_shr() argument 166 return (u64)(((unsigned __int128)a * mul) >> shift); in mul_u64_u32_shr() 171 static __always_inline u64 mul_u64_u64_shr(u64 a, u64 mul, unsigned int shift) in mul_u64_u64_shr() argument 173 return (u64)(((unsigned __int128)a * mul) >> shift); in mul_u64_u64_shr() 180 static __always_inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift) in mul_u64_u32_shr() argument 188 ret = mul_u32_u32(al, mul) >> shift; in mul_u64_u32_shr() 190 ret += mul_u32_u32(ah, mul) << (32 - shift); in mul_u64_u32_shr() 261 static inline u64 mul_u64_u32_div(u64 a, u32 mul, u32 divisor) in mul_u64_u32_div() argument 275 rl.ll = mul_u32_u32(u.l.low, mul); in mul_u64_u32_div() 276 rh.ll = mul_u32_u32(u.l.high, mul) + rl.l.high; in mul_u64_u32_div() [all …]
|
/linux-6.6.21/drivers/net/wireless/ath/ath9k/ |
D | common.h | 39 #define ATH_EP_MUL(x, mul) ((x) * (mul)) argument 47 #define ATH_EP_RND(x, mul) \ argument 48 (((x) + ((mul)/2)) / (mul))
|
/linux-6.6.21/drivers/gpu/drm/i915/ |
D | i915_fixed.h | 75 static inline u32 mul_round_up_u32_fixed16(u32 val, uint_fixed_16_16_t mul) in mul_round_up_u32_fixed16() argument 79 tmp = mul_u32_u32(val, mul.val); in mul_round_up_u32_fixed16() 87 uint_fixed_16_16_t mul) in mul_fixed16() 91 tmp = mul_u32_u32(val.val, mul.val); in mul_fixed16() 118 static inline uint_fixed_16_16_t mul_u32_fixed16(u32 val, uint_fixed_16_16_t mul) in mul_u32_fixed16() argument 122 tmp = mul_u32_u32(val, mul.val); in mul_u32_fixed16()
|
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_afmt.c | 54 unsigned long div, mul; in amdgpu_afmt_calc_cts() local 70 mul = ((128*freq/1000) + (n-1))/n; in amdgpu_afmt_calc_cts() 72 n *= mul; in amdgpu_afmt_calc_cts() 73 cts *= mul; in amdgpu_afmt_calc_cts()
|
/linux-6.6.21/arch/arm/lib/ |
D | muldi3.S | 28 mul xh, yl, xh 35 mul yh, xl, yh 36 mul xl, yl, xl 37 mul ip, yl, ip
|
/linux-6.6.21/arch/m68k/fpsp040/ |
D | binstr.S | 16 | bit 63. The fraction is multiplied by 10 using a mul by 2 17 | shift and a mul by 8 shift. The bits shifted out of the 51 | d2: upper 32-bits of fraction for mul by 8 52 | d3: lower 32-bits of fraction for mul by 8 53 | d4: upper 32-bits of fraction for mul by 2 54 | d5: lower 32-bits of fraction for mul by 2 97 asll #1,%d5 |mul d5 by 2 98 roxll #1,%d4 |mul d4 by 2 100 addxw %d6,%d1 |add in extend from mul by 2 102 | A5. Add mul by 8 to mul by 2. D1 contains the digit formed.
|
/linux-6.6.21/drivers/pwm/ |
D | pwm-img.c | 95 unsigned long mul, output_clk_hz, input_clk_hz; in img_pwm_config() local 109 mul = DIV_ROUND_UP(input_clk_hz, output_clk_hz); in img_pwm_config() 110 if (mul <= max_timebase) { in img_pwm_config() 112 timebase = DIV_ROUND_UP(mul, 1); in img_pwm_config() 113 } else if (mul <= max_timebase * 8) { in img_pwm_config() 115 timebase = DIV_ROUND_UP(mul, 8); in img_pwm_config() 116 } else if (mul <= max_timebase * 64) { in img_pwm_config() 118 timebase = DIV_ROUND_UP(mul, 64); in img_pwm_config() 119 } else if (mul <= max_timebase * 512) { in img_pwm_config() 121 timebase = DIV_ROUND_UP(mul, 512); in img_pwm_config()
|
/linux-6.6.21/drivers/media/i2c/ |
D | ccs-pll.c | 292 struct ccs_pll *pll, u32 mul, u32 div) in __ccs_pll_calculate_vt_tree() argument 308 pll_fr->pll_ip_clk_freq_hz * mul)); in __ccs_pll_calculate_vt_tree() 311 more_mul *= DIV_ROUND_UP(lim_fr->min_pll_multiplier, mul * more_mul); in __ccs_pll_calculate_vt_tree() 314 pll_fr->pll_multiplier = mul * more_mul; in __ccs_pll_calculate_vt_tree() 409 u32 mul, div; in ccs_pll_calculate_vt_tree() local 413 mul = pre_mul * pll_fr->pre_pll_clk_div / div; in ccs_pll_calculate_vt_tree() 417 pll_fr->pre_pll_clk_div, mul, div); in ccs_pll_calculate_vt_tree() 420 mul, div); in ccs_pll_calculate_vt_tree() 591 struct ccs_pll_branch_bk *op_pll_bk, u32 mul, in ccs_pll_calculate_op() argument 612 more_mul_max = op_lim_fr->max_pll_multiplier / mul; in ccs_pll_calculate_op() [all …]
|
/linux-6.6.21/arch/x86/include/asm/ |
D | div64.h | 87 static inline u64 mul_u64_u64_div_u64(u64 a, u64 mul, u64 div) in mul_u64_u64_div_u64() argument 92 : "a" (a), "rm" (mul), "rm" (div) in mul_u64_u64_div_u64() 99 static inline u64 mul_u64_u32_div(u64 a, u32 mul, u32 div) in mul_u64_u32_div() argument 101 return mul_u64_u64_div_u64(a, mul, div); in mul_u64_u32_div()
|
/linux-6.6.21/drivers/clk/imgtec/ |
D | clk-boston.c | 34 uint mmcmdiv, mul, cpu_div, sys_div; in clk_boston_setup() local 53 mul = ext_field(mmcmdiv, BOSTON_PLAT_MMCMDIV_MUL); in clk_boston_setup() 56 sys_freq = mult_frac(in_freq, mul, sys_div); in clk_boston_setup() 59 cpu_freq = mult_frac(in_freq, mul, cpu_div); in clk_boston_setup()
|
/linux-6.6.21/drivers/gpu/drm/tegra/ |
D | hda.c | 14 unsigned int mul, div, bits, channels; in tegra_hda_parse_format() local 26 mul = (format & AC_FMT_MULT_MASK) >> AC_FMT_MULT_SHIFT; in tegra_hda_parse_format() 29 fmt->sample_rate *= (mul + 1) / (div + 1); in tegra_hda_parse_format()
|
/linux-6.6.21/drivers/iio/ |
D | industrialio-gts-helper.c | 316 gts->itime_table[i].mul; in iio_gts_build_avail_scale_table() 525 if (t->sel < 0 || t->time_us < 0 || t->mul <= 0) in sanity_check_time() 560 int gain, mul, res; in iio_gts_sanity_check() local 563 mul = gts->itime_table[t].mul; in iio_gts_sanity_check() 565 if (check_mul_overflow(gain, mul, &res)) in iio_gts_sanity_check() 848 return time->mul; in iio_gts_get_int_time_gain_multiplier_by_sel() 872 int ret, mul; in iio_gts_find_gain_for_scale_using_time() local 882 mul = ret; in iio_gts_find_gain_for_scale_using_time() 884 ret = gain_get_scale_fraction(gts->max_scale, scale_linear, mul, gain); in iio_gts_find_gain_for_scale_using_time() 940 return gain * itime->mul; in iio_gts_get_total_gain() [all …]
|
/linux-6.6.21/arch/arm/boot/compressed/ |
D | ll_char_wr.S | 66 mul r7, r2, r7 71 mul r7, r2, r7 85 mul r4, r2, ip 88 mul ip, r2, ip @ avoid r4 95 mul r4, r2, ip 98 mul ip, r2, ip @ avoid r4
|