/linux/drivers/clk/ |
A D | clk-multiplier.c | 18 return ioread32be(mult->reg); in clk_mult_readl() 20 return readl(mult->reg); in clk_mult_readl() 26 iowrite32be(val, mult->reg); in clk_mult_writel() 28 writel(val, mult->reg); in clk_mult_writel() 47 val = clk_mult_readl(mult) >> mult->shift; in clk_multiplier_recalc_rate() 120 mult->width, mult->flags); in clk_multiplier_round_rate() 133 if (mult->lock) in clk_multiplier_set_rate() 136 __acquire(mult->lock); in clk_multiplier_set_rate() 139 val &= ~GENMASK(mult->width + mult->shift - 1, mult->shift); in clk_multiplier_set_rate() 143 if (mult->lock) in clk_multiplier_set_rate() [all …]
|
A D | clk-fixed-factor.c | 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() 104 fix->mult = mult; in __clk_hw_register_fixed_factor() 136 unsigned int mult, unsigned int div) in clk_hw_register_fixed_factor() argument 139 flags, mult, div, false); in clk_hw_register_fixed_factor() 145 unsigned int mult, unsigned int div) in clk_register_fixed_factor() argument 183 unsigned int mult, unsigned int div) in devm_clk_hw_register_fixed_factor() argument 186 flags, mult, div, true); in devm_clk_hw_register_fixed_factor() 201 u32 div, mult; in _of_fixed_factor_clk_setup() local [all …]
|
/linux/drivers/clk/sunxi-ng/ |
A D | ccu_mult.c | 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() 43 if (cm->mult.max) in ccu_mult_round_rate() 46 _cm.max = (1 << cm->mult.width) + cm->mult.offset - 1; in ccu_mult_round_rate() 125 if (cm->mult.max) in ccu_mult_set_rate() 128 _cm.max = (1 << cm->mult.width) + cm->mult.offset - 1; in ccu_mult_set_rate() 135 reg &= ~GENMASK(cm->mult.width + cm->mult.shift - 1, cm->mult.shift); in ccu_mult_set_rate() [all …]
|
/linux/drivers/clk/renesas/ |
A D | rcar-gen3-cpg.c | 56 unsigned int mult; in cpg_pll_clk_recalc_rate() local 79 mult = clamp(mult, min_mult, max_mult); in cpg_pll_clk_determine_rate() 89 unsigned int mult, i; in cpg_pll_clk_set_rate() local 93 mult = clamp(mult, 1U, 128U); in cpg_pll_clk_set_rate() 119 unsigned int mult, in cpg_pll_clk_register() argument 179 unsigned int mult; in cpg_z_clk_recalc_rate() local 214 mult = clamp(mult, min_mult, max_mult); in cpg_z_clk_determine_rate() 224 unsigned int mult; in cpg_z_clk_set_rate() local 229 mult = clamp(mult, 1U, 32U); in cpg_z_clk_set_rate() 401 mult *= 2; in rcar_gen3_cpg_clk_register() [all …]
|
A D | rcar-gen2-cpg.c | 57 unsigned int mult; in cpg_z_clk_recalc_rate() local 61 mult = 32 - val; in cpg_z_clk_recalc_rate() 78 mult = clamp(mult, min_mult, max_mult); in cpg_z_clk_determine_rate() 88 unsigned int mult; in cpg_z_clk_set_rate() local 93 mult = clamp(mult, 1U, 32U); in cpg_z_clk_set_rate() 176 fixed->mult = 1; in cpg_rcan_clk_register() 283 unsigned int mult = 1; in rcar_gen2_cpg_clk_register() local 306 mult = cpg_pll_config->pll0_mult; in rcar_gen2_cpg_clk_register() 308 if (!mult) { in rcar_gen2_cpg_clk_register() 321 mult = cpg_pll_config->pll3_mult; in rcar_gen2_cpg_clk_register() [all …]
|
A D | clk-sh73a0.c | 81 unsigned int mult = 1; in sh73a0_cpg_register_clock() local 112 mult = ((readl(enable_reg) >> 24) & 0x3f) + 1; in sh73a0_cpg_register_clock() 116 mult *= 2; in sh73a0_cpg_register_clock() 124 mult = readl(dsi_reg); in sh73a0_cpg_register_clock() 125 if (!(mult & 0x8000)) in sh73a0_cpg_register_clock() 126 mult = 1; in sh73a0_cpg_register_clock() 128 mult = (mult & 0x3f) + 1; in sh73a0_cpg_register_clock() 154 mult, div); in sh73a0_cpg_register_clock()
|
A D | r8a779a0-cpg-mssr.c | 300 unsigned int mult; in cpg_z_clk_recalc_rate() local 304 mult = 32 - (val >> __ffs(zclk->mask)); in cpg_z_clk_recalc_rate() 314 unsigned int min_mult, max_mult, mult; in cpg_z_clk_determine_rate() local 335 mult = clamp(mult, min_mult, max_mult); in cpg_z_clk_determine_rate() 345 unsigned int mult; in cpg_z_clk_set_rate() local 350 mult = clamp(mult, 1U, 32U); in cpg_z_clk_set_rate() 440 unsigned int mult = 1; in rcar_r8a779a0_cpg_clk_register() local 454 mult = cpg_pll_config->pll1_mult; in rcar_r8a779a0_cpg_clk_register() 460 mult = (((value >> 24) & 0x7f) + 1) * 2; in rcar_r8a779a0_cpg_clk_register() 464 mult = cpg_pll_config->pll5_mult; in rcar_r8a779a0_cpg_clk_register() [all …]
|
A D | clk-rz.c | 55 unsigned mult; in rz_cpg_register_clock() local 62 mult = cpg_mode ? (32 / 4) : 30; in rz_cpg_register_clock() 64 return clk_register_fixed_factor(NULL, name, parent_name, 0, mult, 1); in rz_cpg_register_clock() 82 mult = frqcr_tab[val]; in rz_cpg_register_clock() 83 return clk_register_fixed_factor(NULL, name, "pll", 0, mult, 3); in rz_cpg_register_clock()
|
/linux/drivers/clk/mvebu/ |
A D | orion.c | 65 *mult = 1; in mv88f5181_get_clk_ratio() 68 *mult = 1; in mv88f5181_get_clk_ratio() 71 *mult = 0; in mv88f5181_get_clk_ratio() 133 *mult = 1; in mv88f5182_get_clk_ratio() 136 *mult = 1; in mv88f5182_get_clk_ratio() 139 *mult = 0; in mv88f5182_get_clk_ratio() 190 *mult = 1; in mv88f5281_get_clk_ratio() 193 *mult = 1; in mv88f5281_get_clk_ratio() 196 *mult = 0; in mv88f5281_get_clk_ratio() 256 *mult = 1; in mv88f6183_get_clk_ratio() [all …]
|
A D | mv98dx3236.c | 118 void __iomem *sar, int id, int *mult, int *div) in mv98dx3236_get_clk_ratio() argument 126 *mult = mv98dx4251_cpu_ddr_ratios[opt][0]; in mv98dx3236_get_clk_ratio() 129 *mult = mv98dx3236_cpu_ddr_ratios[opt][0]; in mv98dx3236_get_clk_ratio() 135 *mult = mv98dx4251_cpu_mpll_ratios[opt][0]; in mv98dx3236_get_clk_ratio() 138 *mult = mv98dx3236_cpu_mpll_ratios[opt][0]; in mv98dx3236_get_clk_ratio()
|
/linux/drivers/clk/sunxi/ |
A D | clk-sun4i-pll3.c | 24 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()
|
A D | clk-a10-pll2.c | 44 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()
|
/linux/drivers/clk/imx/ |
A D | clk-pllv4.c | 78 u32 mult, mfn, mfd; in clk_pllv4_recalc_rate() local 81 mult = readl_relaxed(pll->base + pll->cfg_offset); in clk_pllv4_recalc_rate() 82 mult &= BM_PLL_MULT; in clk_pllv4_recalc_rate() 83 mult >>= BP_PLL_MULT; in clk_pllv4_recalc_rate() 91 return (parent_rate * mult) + (u32)temp64; in clk_pllv4_recalc_rate() 147 if (pllv4_mult_table[i] == mult) in clk_pllv4_is_valid_mult() 158 u32 val, mult, mfn, mfd = DEFAULT_MFD; in clk_pllv4_set_rate() local 161 mult = rate / parent_rate; in clk_pllv4_set_rate() 163 if (!clk_pllv4_is_valid_mult(mult)) in clk_pllv4_set_rate() 169 temp64 = (u64)(rate - mult * parent_rate); in clk_pllv4_set_rate() [all …]
|
/linux/drivers/iio/imu/inv_icm42600/ |
A D | inv_icm42600_timestamp.c | 50 ts->mult = default_period / INV_ICM42600_TIMESTAMP_PERIOD; in inv_icm42600_timestamp_init() 82 static bool inv_validate_period(uint32_t period, uint32_t mult) in inv_validate_period() argument 88 period_min = INV_ICM42600_TIMESTAMP_MIN_PERIOD(chip_period) * mult; in inv_validate_period() 89 period_max = INV_ICM42600_TIMESTAMP_MAX_PERIOD(chip_period) * mult; in inv_validate_period() 97 uint32_t mult, uint32_t period) in inv_compute_chip_period() argument 101 if (!inv_validate_period(period, mult)) in inv_compute_chip_period() 105 new_chip_period = period / mult; in inv_compute_chip_period() 136 ts->period = ts->mult * ts->chip_period.val; in inv_icm42600_timestamp_interrupt() 177 ts->mult = ts->new_mult; in inv_icm42600_timestamp_apply_odr() 179 ts->period = ts->mult * ts->chip_period.val; in inv_icm42600_timestamp_apply_odr()
|
/linux/arch/arm/mach-omap2/ |
A D | clkt2xxx_dpllcore.c | 112 u32 cur_rate, low, mult, div, valid_rate, done_rate; in omap2_reprogram_dpllcore() local 118 mult = omap2xxx_cm_get_core_clk_src(); in omap2_reprogram_dpllcore() 120 if ((rate == (cur_rate / 2)) && (mult == 2)) { in omap2_reprogram_dpllcore() 122 } else if ((rate == (cur_rate * 2)) && (mult == 1)) { in omap2_reprogram_dpllcore() 129 if (mult == 1) in omap2_reprogram_dpllcore() 147 mult = ((rate / 2) / 1000000); in omap2_reprogram_dpllcore() 151 mult = (rate / 1000000); in omap2_reprogram_dpllcore() 155 tmpset.cm_clksel1_pll |= (mult << __ffs(dd->div1_mask)); in omap2_reprogram_dpllcore()
|
/linux/arch/arm/boot/dts/ |
A D | omap36xx-omap3430es2plus-clocks.dtsi | 35 clock-mult = <1>; 51 clock-mult = <1>; 75 clock-mult = <1>; 83 clock-mult = <1>; 91 clock-mult = <1>; 99 clock-mult = <1>; 107 clock-mult = <1>; 115 clock-mult = <1>; 123 clock-mult = <1>; 131 clock-mult = <1>; [all …]
|
A D | am33xx-clocks.dtsi | 20 clock-mult = <1>; 28 clock-mult = <1>; 36 clock-mult = <1>; 44 clock-mult = <1>; 52 clock-mult = <1>; 60 clock-mult = <1>; 68 clock-mult = <1>; 76 clock-mult = <1>; 84 clock-mult = <1>; 92 clock-mult = <1>; [all …]
|
A D | am43xx-clocks.dtsi | 36 clock-mult = <1>; 44 clock-mult = <1>; 52 clock-mult = <1>; 60 clock-mult = <1>; 68 clock-mult = <1>; 76 clock-mult = <1>; 84 clock-mult = <1>; 92 clock-mult = <1>; 100 clock-mult = <1>; 108 clock-mult = <1>; [all …]
|
/linux/sound/core/ |
A D | pcm_timer.c | 21 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()
|
/linux/drivers/thermal/broadcom/ |
A D | brcmstb_thermal.c | 107 unsigned int mult; member 124 int mult = priv->temp_params->mult; in avs_tmon_code_to_temp() local 126 return (offset - (int)((code & AVS_TMON_TEMP_MASK) * mult)); in avs_tmon_code_to_temp() 139 int mult = priv->temp_params->mult; in avs_tmon_temp_to_code() local 148 return (u32)(DIV_ROUND_UP(offset - temp, mult)); in avs_tmon_temp_to_code() 150 return (u32)((offset - temp) / mult); in avs_tmon_temp_to_code() 297 .mult = 557, 308 .mult = 487,
|
/linux/drivers/net/ethernet/mellanox/mlx4/ |
A D | en_clock.c | 124 u32 diff, mult; in mlx4_en_phc_adjfreq() local 134 mult = mdev->nominal_c_mult; in mlx4_en_phc_adjfreq() 135 adj = mult; in mlx4_en_phc_adjfreq() 141 mdev->cycles.mult = neg_adj ? mult - diff : mult + diff; in mlx4_en_phc_adjfreq() 281 mdev->cycles.mult = in mlx4_en_init_timestamp() 283 mdev->nominal_c_mult = mdev->cycles.mult; in mlx4_en_init_timestamp()
|
/linux/drivers/net/ethernet/pensando/ionic/ |
A D | ionic_phc.c | 311 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 547 if (!phc->cc.mult) { in ionic_lif_alloc_phc() 550 phc->cc.mult); 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() 604 shift = mult / phc->cc.mult; in ionic_lif_alloc_phc() 609 phc->cc.mult <<= shift; in ionic_lif_alloc_phc() [all …]
|
/linux/drivers/cpufreq/ |
A D | longhaul.c | 111 khz = (mult/10)*fsb; in calc_speed() 112 if (mult%10) in calc_speed() 249 int speed, mult; in longhaul_setstate() local 260 if (mult == -1) in longhaul_setstate() 263 speed = calc_speed(mult); in longhaul_setstate() 275 fsb, mult/10, mult%10, print_speed(speed/1000)); in longhaul_setstate() 406 static int guess_fsb(int mult) in guess_fsb() argument 428 int mult; in longhaul_get_ranges() local 432 if (mult == -1) { in longhaul_get_ranges() 436 fsb = guess_fsb(mult); in longhaul_get_ranges() [all …]
|
/linux/drivers/clk/davinci/ |
A D | pll.c | 120 u32 mult; in davinci_pll_recalc_rate() local 123 rate *= mult + 1; in davinci_pll_recalc_rate() 136 u32 mult; in davinci_pll_determine_rate() local 143 mult = rate / parent_rate; in davinci_pll_determine_rate() 151 if (mult < pll->pllm_min || mult > pll->pllm_max) in davinci_pll_determine_rate() 162 for (mult = pll->pllm_min; mult <= pll->pllm_max; mult++) { in davinci_pll_determine_rate() 164 r = parent_rate * mult; in davinci_pll_determine_rate() 185 u32 mult; in davinci_pll_set_rate() local 187 mult = rate / parent_rate; in davinci_pll_set_rate() 212 u32 mult; in dm365_pll_recalc_rate() local [all …]
|
/linux/kernel/time/ |
A D | sched_clock.c | 61 .read_data[0] = { .mult = NSEC_PER_SEC / HZ, 66 static inline u64 notrace cyc_to_ns(u64 cyc, u32 mult, u32 shift) in cyc_to_ns() argument 68 return (cyc * mult) >> shift; in cyc_to_ns() 93 res = rd->epoch_ns + cyc_to_ns(cyc, rd->mult, rd->shift); in sched_clock() 136 ns = rd.epoch_ns + cyc_to_ns((cyc - rd.epoch_cyc) & rd.sched_clock_mask, rd.mult, rd.shift); in update_sched_clock() 182 ns = rd.epoch_ns + cyc_to_ns((cyc - rd.epoch_cyc) & rd.sched_clock_mask, rd.mult, rd.shift); in sched_clock_register() 187 rd.mult = new_mult; in sched_clock_register()
|