Lines Matching refs:rate
77 tmp_parent_rate = req->rate * div;
84 if (tmp_rate < req->rate)
85 tmp_diff = req->rate - tmp_rate;
87 tmp_diff = tmp_rate - req->rate;
96 if (!best_diff || tmp_rate < req->rate)
107 req->rate = best_rate;
133 static int at91sam9x5_clk_usb_set_rate(struct clk_hw *hw, unsigned long rate,
139 if (!rate)
142 div = DIV_ROUND_CLOSEST(parent_rate, rate);
159 usb->pms.rate = at91sam9x5_clk_usb_recalc_rate(hw, usb->pms.parent_rate);
173 at91sam9x5_clk_usb_set_rate(hw, usb->pms.rate, usb->pms.parent_rate);
322 static long at91rm9200_clk_usb_round_rate(struct clk_hw *hw, unsigned long rate,
339 tmp_parent_rate = rate * usb->divisors[i];
342 if (tmprate < rate)
343 tmpdiff = rate - tmprate;
345 tmpdiff = tmprate - rate;
360 static int at91rm9200_clk_usb_set_rate(struct clk_hw *hw, unsigned long rate,
367 if (!rate)
370 div = DIV_ROUND_CLOSEST(parent_rate, rate);