Lines Matching refs:rate
755 pr_debug("%s - refin_div: %llu, apll rate: %llu\n",
761 static void vc7_calc_iod_divider(unsigned long rate, unsigned long parent_rate,
764 *divider = DIV_ROUND_UP(parent_rate, rate);
771 static void vc7_calc_fod_1st_stage(unsigned long rate, unsigned long parent_rate,
776 *div_int = (u32)div64_u64_rem(parent_rate, rate, &rem);
777 *div_frac = div64_u64(rem << VC7_FOD_DENOMINATOR_BITS, rate);
815 static void vc7_calc_fod_divider(unsigned long rate, unsigned long parent_rate,
821 vc7_calc_fod_1st_stage(rate, parent_rate, fod_1st_int, fod_frac);
841 vc7_calc_fod_1st_stage(parent_rate, rate * 2 * i, fod_1st_int, fod_frac);
898 pr_debug("%s - %s rate: %lu\n", __func__, clk_hw_get_name(hw), fod_rate);
903 static long vc7_fod_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate)
908 pr_debug("%s - %s: requested rate: %lu, parent_rate: %lu\n",
909 __func__, clk_hw_get_name(hw), rate, *parent_rate);
911 vc7_calc_fod_divider(rate, *parent_rate,
919 pr_debug("%s - %s rate: %lu\n", __func__, clk_hw_get_name(hw), fod_rate);
924 static int vc7_fod_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate)
930 pr_debug("%s - %s: rate: %lu, parent_rate: %lu\n",
931 __func__, clk_hw_get_name(hw), rate, parent_rate);
933 if (rate < VC7_FOD_RATE_MIN || rate > VC7_FOD_RATE_MAX) {
936 rate, clk_hw_get_name(hw));
948 pr_debug("%s - %s rate: %lu\n", __func__, clk_hw_get_name(hw), fod_rate);
976 pr_debug("%s - %s rate: %lu\n", __func__, clk_hw_get_name(hw), iod_rate);
981 static long vc7_iod_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate)
986 pr_debug("%s - %s: requested rate: %lu, parent_rate: %lu\n",
987 __func__, clk_hw_get_name(hw), rate, *parent_rate);
989 vc7_calc_iod_divider(rate, *parent_rate, &iod->iod_int);
993 pr_debug("%s - %s rate: %ld\n", __func__, clk_hw_get_name(hw), iod_rate);
998 static int vc7_iod_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate)
1004 pr_debug("%s - %s: rate: %lu, parent_rate: %lu\n",
1005 __func__, clk_hw_get_name(hw), rate, parent_rate);
1007 if (rate < VC7_IOD_RATE_MIN || rate > VC7_IOD_RATE_MAX) {
1010 rate, clk_hw_get_name(hw));
1019 pr_debug("%s - %s rate: %ld\n", __func__, clk_hw_get_name(hw), iod_rate);