Lines Matching refs:rate
227 * rate - inherits rate from parent. set_rate/round_rate/recalc_rate
323 unsigned long *rate)
327 *rate = input * nd;
336 unsigned long rate = 0;
340 if (clk_fs660c32_vco_get_rate(parent_rate, ¶ms, &rate))
341 pr_err("%s:%s error calculating rate\n",
346 return rate;
379 unsigned long rate,
384 if (clk_fs660c32_vco_get_params(*prate, rate, ¶ms))
385 return rate;
387 clk_fs660c32_vco_get_rate(*prate, ¶ms, &rate);
389 pr_debug("%s: %s new rate %ld [ndiv=%u]\n",
391 rate, (unsigned int)params.ndiv);
393 return rate;
396 static int quadfs_pll_fs660c32_set_rate(struct clk_hw *hw, unsigned long rate,
405 if (!rate || !parent_rate)
408 ret = clk_fs660c32_vco_get_params(parent_rate, rate, ¶ms);
414 pr_debug("%s: %s new rate %ld [ndiv=0x%x]\n",
487 * rate - set rate is functional
520 * 2. It restores the clock rate when a driver does an enable
623 const struct stm_fs *fs, unsigned long *rate)
640 *rate = (unsigned long)div64_u64(input * P20 * 32, res);
762 * If All are NULL then assume no clock rate is programmed.
782 unsigned long rate = 0;
788 clk_fs_get_rate(prate, params, &rate);
790 return rate;
797 unsigned long rate = 0;
807 if (clk_fs_get_rate(parent_rate, ¶ms, &rate)) {
808 pr_err("%s:%s error calculating rate\n",
812 pr_debug("%s:%s rate %lu\n", clk_hw_get_name(hw), __func__, rate);
814 return rate;
817 static long quadfs_round_rate(struct clk_hw *hw, unsigned long rate,
822 rate = quadfs_find_best_rate(hw, rate, *prate, ¶ms);
824 pr_debug("%s: %s new rate %ld [sdiv=0x%x,md=0x%x,pe=0x%x,nsdiv3=%u]\n",
826 rate, (unsigned int)params.sdiv, (unsigned int)params.mdiv,
829 return rate;
849 static int quadfs_set_rate(struct clk_hw *hw, unsigned long rate,
856 if (!rate || !parent_rate)
861 hwrate = quadfs_find_best_rate(hw, rate, parent_rate, ¶ms);
973 pr_debug("%s: parent %s rate %u\n",
1027 pr_debug("%s: parent %s rate %u\n",