Home
last modified time | relevance | path

Searched full:mult (Results 1 – 25 of 590) sorted by relevance

12345678910>>...24

/openbmc/linux/drivers/clk/
H A Dclk-multiplier.c15 static inline u32 clk_mult_readl(struct clk_multiplier *mult) in clk_mult_readl() argument
17 if (mult->flags & CLK_MULTIPLIER_BIG_ENDIAN) in clk_mult_readl()
18 return ioread32be(mult->reg); in clk_mult_readl()
20 return readl(mult->reg); in clk_mult_readl()
23 static inline void clk_mult_writel(struct clk_multiplier *mult, u32 val) in clk_mult_writel() argument
25 if (mult->flags & CLK_MULTIPLIER_BIG_ENDIAN) in clk_mult_writel()
26 iowrite32be(val, mult->reg); in clk_mult_writel()
28 writel(val, mult->reg); in clk_mult_writel()
31 static unsigned long __get_mult(struct clk_multiplier *mult, in __get_mult() argument
35 if (mult->flags & CLK_MULTIPLIER_ROUND_CLOSEST) in __get_mult()
[all …]
H A Dclk-fixed-factor.c18 * rate - rate is fixed. clk->rate = parent->rate / div * mult
28 rate = (unsigned long long int)parent_rate * fix->mult; in clk_factor_recalc_rate()
41 best_parent = (rate / fix->mult) * fix->div; in clk_factor_round_rate()
45 return (*prate / fix->div) * fix->mult; in clk_factor_round_rate()
83 unsigned long flags, unsigned int mult, unsigned int div, in __clk_hw_register_fixed_factor() argument
105 fix->mult = mult; in __clk_hw_register_fixed_factor()
144 * @mult: multiplier
152 unsigned int mult, unsigned int div) in devm_clk_hw_register_fixed_factor_index() argument
155 flags, mult, div, true); in devm_clk_hw_register_fixed_factor_index()
166 * @mult: multiplier
[all …]
/openbmc/linux/drivers/clk/sunxi-ng/
H A Dccu_mult.c14 unsigned long mult, min, max; member
18 struct _ccu_mult *mult) in ccu_mult_find_best() argument
23 if (_mult < mult->min) in ccu_mult_find_best()
24 _mult = mult->min; in ccu_mult_find_best()
26 if (_mult > mult->max) in ccu_mult_find_best()
27 _mult = mult->max; in ccu_mult_find_best()
29 mult->mult = _mult; in ccu_mult_find_best()
41 _cm.min = cm->mult.min; in ccu_mult_round_rate()
43 if (cm->mult.max) in ccu_mult_round_rate()
44 _cm.max = cm->mult.max; in ccu_mult_round_rate()
[all …]
/openbmc/linux/drivers/clk/renesas/
H A Drcar-gen4-cpg.c48 #define CPG_PLLxCR0_NI GENMASK(27, 20) /* Integer mult. factor */
74 unsigned int mult; in cpg_pll_clk_recalc_rate() local
76 mult = FIELD_GET(CPG_PLLxCR0_NI, readl(pll_clk->pllcr0_reg)) + 1; in cpg_pll_clk_recalc_rate()
78 return parent_rate * mult * 2; in cpg_pll_clk_recalc_rate()
84 unsigned int min_mult, max_mult, mult; in cpg_pll_clk_determine_rate() local
93 mult = DIV_ROUND_CLOSEST_ULL(req->rate, prate); in cpg_pll_clk_determine_rate()
94 mult = clamp(mult, min_mult, max_mult); in cpg_pll_clk_determine_rate()
96 req->rate = prate * mult; in cpg_pll_clk_determine_rate()
104 unsigned int mult; in cpg_pll_clk_set_rate() local
107 mult = DIV_ROUND_CLOSEST_ULL(rate, parent_rate * 2); in cpg_pll_clk_set_rate()
[all …]
H A Drcar-gen3-cpg.c37 #define CPG_PLLnCR_STC_MASK GENMASK(30, 24) /* PLL Circuit Mult. Ratio */
56 unsigned int mult; in cpg_pll_clk_recalc_rate() local
60 mult = (val >> __ffs(CPG_PLLnCR_STC_MASK)) + 1; in cpg_pll_clk_recalc_rate()
62 return parent_rate * mult * pll_clk->fixed_mult; in cpg_pll_clk_recalc_rate()
69 unsigned int min_mult, max_mult, mult; in cpg_pll_clk_determine_rate() local
78 mult = DIV_ROUND_CLOSEST_ULL(req->rate, prate); in cpg_pll_clk_determine_rate()
79 mult = clamp(mult, min_mult, max_mult); in cpg_pll_clk_determine_rate()
81 req->rate = prate * mult; in cpg_pll_clk_determine_rate()
89 unsigned int mult, i; in cpg_pll_clk_set_rate() local
92 mult = DIV_ROUND_CLOSEST_ULL(rate, parent_rate * pll_clk->fixed_mult); in cpg_pll_clk_set_rate()
[all …]
H A Drcar-gen2-cpg.c41 * rate - rate is adjustable. clk->rate = parent->rate * mult / 32
57 unsigned int mult; in cpg_z_clk_recalc_rate() local
61 mult = 32 - val; in cpg_z_clk_recalc_rate()
63 return div_u64((u64)parent_rate * mult, 32); in cpg_z_clk_recalc_rate()
70 unsigned int min_mult, max_mult, mult; in cpg_z_clk_determine_rate() local
77 mult = div64_ul(req->rate * 32ULL, prate); in cpg_z_clk_determine_rate()
78 mult = clamp(mult, min_mult, max_mult); in cpg_z_clk_determine_rate()
80 req->rate = div_u64((u64)prate * mult, 32); in cpg_z_clk_determine_rate()
88 unsigned int mult; in cpg_z_clk_set_rate() local
92 mult = div64_ul(rate * 32ULL, parent_rate); in cpg_z_clk_set_rate()
[all …]
/openbmc/linux/drivers/clk/imx/
H A Dclk-pllv4.c50 /* Valid PLL MULT Table */
53 /* Valid PLL MULT range, (max, min) */
82 u32 mult, mfn, mfd; in clk_pllv4_recalc_rate() local
85 mult = readl_relaxed(pll->base + pll->cfg_offset); in clk_pllv4_recalc_rate()
86 mult &= BM_PLL_MULT; in clk_pllv4_recalc_rate()
87 mult >>= BP_PLL_MULT; in clk_pllv4_recalc_rate()
95 return (parent_rate * mult) + (u32)temp64; in clk_pllv4_recalc_rate()
107 u32 mult; in clk_pllv4_round_rate() local
112 mult = temp64; in clk_pllv4_round_rate()
113 if (mult >= pllv4_mult_range[1] && in clk_pllv4_round_rate()
[all …]
/openbmc/linux/drivers/iio/common/inv_sensors/
H A Dinv_sensors_timestamp.c52 ts->mult = chip->init_period / chip->clock_period; in inv_sensors_timestamp_init()
63 uint32_t mult; in inv_sensors_timestamp_update_odr() local
69 mult = period / ts->chip.clock_period; in inv_sensors_timestamp_update_odr()
70 if (mult != ts->mult) in inv_sensors_timestamp_update_odr()
71 ts->new_mult = mult; in inv_sensors_timestamp_update_odr()
81 static bool inv_validate_period(struct inv_sensors_timestamp *ts, uint32_t period, uint32_t mult) in inv_validate_period() argument
86 period_min = ts->min_period * mult; in inv_validate_period()
87 period_max = ts->max_period * mult; in inv_validate_period()
95 uint32_t mult, uint32_t period) in inv_update_chip_period() argument
99 if (!inv_validate_period(ts, period, mult)) in inv_update_chip_period()
[all …]
/openbmc/linux/drivers/clk/sunxi/
H A Dclk-sun4i-pll3.c24 struct clk_multiplier *mult; in sun4i_a10_pll3_setup() local
48 mult = kzalloc(sizeof(*mult), GFP_KERNEL); in sun4i_a10_pll3_setup()
49 if (!mult) in sun4i_a10_pll3_setup()
52 mult->reg = reg; in sun4i_a10_pll3_setup()
53 mult->shift = SUN4I_A10_PLL3_DIV_SHIFT; in sun4i_a10_pll3_setup()
54 mult->width = SUN4I_A10_PLL3_DIV_WIDTH; in sun4i_a10_pll3_setup()
55 mult->lock = &sun4i_a10_pll3_lock; in sun4i_a10_pll3_setup()
60 &mult->hw, &clk_multiplier_ops, in sun4i_a10_pll3_setup()
80 kfree(mult); in sun4i_a10_pll3_setup()
H A Dclk-a10-pll2.c44 struct clk_multiplier *mult; in sun4i_pll2_setup() local
83 mult = kzalloc(sizeof(struct clk_multiplier), GFP_KERNEL); in sun4i_pll2_setup()
84 if (!mult) in sun4i_pll2_setup()
87 mult->reg = reg; in sun4i_pll2_setup()
88 mult->shift = SUN4I_PLL2_N_SHIFT; in sun4i_pll2_setup()
89 mult->width = 7; in sun4i_pll2_setup()
90 mult->flags = CLK_MULTIPLIER_ZERO_BYPASS | in sun4i_pll2_setup()
92 mult->lock = &sun4i_a10_pll2_lock; in sun4i_pll2_setup()
98 &mult->hw, &clk_multiplier_ops, in sun4i_pll2_setup()
168 kfree(mult); in sun4i_pll2_setup()
/openbmc/linux/drivers/clk/mvebu/
H A Dorion.c60 int *mult, int *div) in mv88f5181_get_clk_ratio() argument
65 *mult = 1; in mv88f5181_get_clk_ratio()
68 *mult = 1; in mv88f5181_get_clk_ratio()
71 *mult = 0; in mv88f5181_get_clk_ratio()
128 int *mult, int *div) in mv88f5182_get_clk_ratio() argument
133 *mult = 1; in mv88f5182_get_clk_ratio()
136 *mult = 1; in mv88f5182_get_clk_ratio()
139 *mult = 0; in mv88f5182_get_clk_ratio()
185 int *mult, int *div) in mv88f5281_get_clk_ratio() argument
190 *mult = 1; in mv88f5281_get_clk_ratio()
[all …]
/openbmc/linux/include/linux/
H A Dclocksource.h42 * @mult: Cycle to nanosecond multiplier
45 * @maxadj: Maximum adjustment value to mult (~11%)
99 u32 mult; member
150 * mult/2^shift = ns/cyc in clocksource_freq2mult()
151 * mult = ns/cyc * 2^shift in clocksource_freq2mult()
152 * mult = from/freq * 2^shift in clocksource_freq2mult()
153 * mult = from * 2^shift / freq in clocksource_freq2mult()
154 * mult = (from<<shift) / freq in clocksource_freq2mult()
165 * clocksource_khz2mult - calculates mult from khz and shift
178 * clocksource_hz2mult - calculates mult from hz and shift
[all …]
H A Drandom.h78 u32 mult = ceil * get_random_u8(); in get_random_u32_below() local
79 if (likely(is_power_of_2(ceil) || (u8)mult >= (1U << 8) % ceil)) in get_random_u32_below()
80 return mult >> 8; in get_random_u32_below()
82 u32 mult = ceil * get_random_u16(); in get_random_u32_below() local
83 if (likely(is_power_of_2(ceil) || (u16)mult >= (1U << 16) % ceil)) in get_random_u32_below()
84 return mult >> 16; in get_random_u32_below()
86 u64 mult = (u64)ceil * get_random_u32(); in get_random_u32_below() local
87 if (likely(is_power_of_2(ceil) || (u32)mult >= -ceil % ceil)) in get_random_u32_below()
88 return mult >> 32; in get_random_u32_below()
/openbmc/openbmc/meta-openembedded/meta-networking/recipes-support/ncp/libowfat/
H A D0001-Depend-on-haveuint128.h-for-umult64.c.patch7 mult/umult64.c:9:10: fatal error: 'haveuint128.h' file not found
33 @@ -430,7 +430,7 @@ range_str4inbuf.o: mult/range_str4inbuf.c rangecheck.h
34 range_strinbuf.o: mult/range_strinbuf.c rangecheck.h
35 umult16.o: mult/umult16.c uint16.h
36 umult32.o: mult/umult32.c uint32.h
37 -umult64.o: mult/umult64.c uint64.h
38 +umult64.o: mult/umult64.c uint64.h haveuint128.h
/openbmc/u-boot/arch/arm/dts/
H A Dam33xx-clocks.dtsi23 clock-mult = <1>;
31 clock-mult = <1>;
39 clock-mult = <1>;
47 clock-mult = <1>;
55 clock-mult = <1>;
63 clock-mult = <1>;
71 clock-mult = <1>;
79 clock-mult = <1>;
87 clock-mult = <1>;
95 clock-mult = <1>;
[all …]
H A Domap36xx-omap3430es2plus-clocks.dtsi38 clock-mult = <1>;
54 clock-mult = <1>;
78 clock-mult = <1>;
86 clock-mult = <1>;
94 clock-mult = <1>;
102 clock-mult = <1>;
110 clock-mult = <1>;
118 clock-mult = <1>;
126 clock-mult = <1>;
134 clock-mult = <1>;
[all …]
H A Dam43xx-clocks.dtsi39 clock-mult = <1>;
47 clock-mult = <1>;
55 clock-mult = <1>;
63 clock-mult = <1>;
71 clock-mult = <1>;
79 clock-mult = <1>;
87 clock-mult = <1>;
95 clock-mult = <1>;
103 clock-mult = <1>;
321 clock-mult = <1>;
[all …]
/openbmc/linux/sound/core/
H A Dpcm_timer.c21 unsigned long rate, mult, fsize, l, post; in snd_pcm_timer_resolution_change() local
24 mult = 1000000000; in snd_pcm_timer_resolution_change()
28 l = gcd(mult, rate); in snd_pcm_timer_resolution_change()
29 mult /= l; in snd_pcm_timer_resolution_change()
38 while ((mult * fsize) / fsize != mult) { in snd_pcm_timer_resolution_change()
39 mult /= 2; in snd_pcm_timer_resolution_change()
49 runtime->timer_resolution = (mult * fsize / rate) * post; in snd_pcm_timer_resolution_change()
/openbmc/linux/arch/arm/boot/dts/ti/omap/
H A Domap36xx-omap3430es2plus-clocks.dtsi49 clock-mult = <1>;
80 clock-mult = <1>;
103 clock-mult = <1>;
111 clock-mult = <1>;
119 clock-mult = <1>;
127 clock-mult = <1>;
135 clock-mult = <1>;
143 clock-mult = <1>;
151 clock-mult = <1>;
159 clock-mult = <1>;
[all …]
H A Dam33xx-clocks.dtsi22 clock-mult = <1>;
31 clock-mult = <1>;
40 clock-mult = <1>;
49 clock-mult = <1>;
58 clock-mult = <1>;
67 clock-mult = <1>;
76 clock-mult = <1>;
85 clock-mult = <1>;
94 clock-mult = <1>;
103 clock-mult = <1>;
[all …]
/openbmc/u-boot/drivers/clk/renesas/
H A Dclk-rcar-gen3.c163 u32 value, mult, div, prediv, postdiv; in gen3_clk_get_rate64() local
213 mult = (((value >> 24) & 0x7f) + 1) * 2; in gen3_clk_get_rate64()
214 rate = gen3_clk_get_rate64(&parent) * mult; in gen3_clk_get_rate64()
215 debug("%s[%i] PLL0 clk: parent=%i mult=%u => rate=%llu\n", in gen3_clk_get_rate64()
216 __func__, __LINE__, core->parent, mult, rate); in gen3_clk_get_rate64()
230 mult = (((value >> 24) & 0x7f) + 1) * 2; in gen3_clk_get_rate64()
231 rate = gen3_clk_get_rate64(&parent) * mult; in gen3_clk_get_rate64()
232 debug("%s[%i] PLL2 clk: parent=%i mult=%u => rate=%llu\n", in gen3_clk_get_rate64()
233 __func__, __LINE__, core->parent, mult, rate); in gen3_clk_get_rate64()
247 mult = (((value >> 24) & 0x7f) + 1) * 2; in gen3_clk_get_rate64()
[all …]
/openbmc/linux/arch/arm64/boot/dts/broadcom/stingray/
H A Dstingray-clock.dtsi46 clock-mult = <1>;
132 clock-mult = <1>;
140 clock-mult = <1>;
149 clock-mult = <1>;
157 clock-mult = <1>;
165 clock-mult = <1>;
173 clock-mult = <1>;
181 clock-mult = <1>;
/openbmc/linux/arch/arm/mach-omap2/
H A Dclkt2xxx_dpllcore.c113 u32 cur_rate, low, mult, div, valid_rate, done_rate; in omap2_reprogram_dpllcore() local
119 mult = omap2xxx_cm_get_core_clk_src(); in omap2_reprogram_dpllcore()
121 if ((rate == (cur_rate / 2)) && (mult == 2)) { in omap2_reprogram_dpllcore()
123 } else if ((rate == (cur_rate * 2)) && (mult == 1)) { in omap2_reprogram_dpllcore()
130 if (mult == 1) in omap2_reprogram_dpllcore()
148 mult = ((rate / 2) / 1000000); in omap2_reprogram_dpllcore()
152 mult = (rate / 1000000); in omap2_reprogram_dpllcore()
156 tmpset.cm_clksel1_pll |= (mult << __ffs(dd->div1_mask)); in omap2_reprogram_dpllcore()
/openbmc/linux/drivers/clk/ti/
H A Dfixed-factor.c33 u32 div, mult; in of_ti_fixed_factor_clk_setup() local
41 if (of_property_read_u32(node, "ti,clock-mult", &mult)) { in of_ti_fixed_factor_clk_setup()
42 pr_err("%pOFn must have a clock-mult property\n", node); in of_ti_fixed_factor_clk_setup()
52 mult, div); in of_ti_fixed_factor_clk_setup()
/openbmc/linux/drivers/net/ethernet/pensando/ionic/
H A Dionic_phc.c311 ctx->cmd.lif_setphc.mult = cpu_to_le32(phc->cc.mult); in ionic_setphc_cmd()
342 phc->cc.mult = adj; in ionic_phc_adjfine()
524 u64 delay, diff, mult; in ionic_lif_alloc_phc() local
544 phc->cc.mult = le32_to_cpu(ionic->ident.dev.hwstamp_mult); in ionic_lif_alloc_phc()
547 if (!phc->cc.mult) { in ionic_lif_alloc_phc()
550 phc->cc.mult); in ionic_lif_alloc_phc()
556 dev_dbg(lif->ionic->dev, "Device PHC mask %#llx mult %u shift %u\n", in ionic_lif_alloc_phc()
557 phc->cc.mask, phc->cc.mult, phc->cc.shift); in ionic_lif_alloc_phc()
567 diff = U64_MAX / phc->cc.mult / 2; in ionic_lif_alloc_phc()
571 diff = DIV_ROUND_UP(diff, phc->cc.mult); in ionic_lif_alloc_phc()
[all …]

12345678910>>...24