/* Return: the PLL's output clock rate, in Hz. The return value from this function is intended to be convenient to pass directly to the Linux clock framework; thus there is no explicit error return value.  */
unsigned long wrpll_calc_output_rate(const struct wrpll_cfg *c, unsigned long parent_rate)
/* Return: the PLL's output clock rate, in Hz. The return value from this function is intended to be convenient to pass directly to the Linux clock framework; thus there is no explicit error return value.  */
unsigned long wrpll_calc_output_rate(const struct wrpll_cfg *c, unsigned long parent_rate)
{
	u8 fbdiv;
	u64 n;
	if (c->flags & WRPLL_FLAGS_EXT_FEEDBACK_MASK) {
		WARN(1, "external feedback mode not yet supported");
		return ULONG_MAX;
	}
	fbdiv = __wrpll_calc_fbdiv(c);
	n = parent_rate * fbdiv * (c->divf + 1);
	n = div_u64(n, c->divr + 1);
	n >>= c->divq;
	return n;
}