Lines Matching refs:fin
172 static unsigned int spi_imx_clkdiv_1(unsigned int fin, in spi_imx_clkdiv_1() argument
178 if (fspi * mxc_clkdivs[i] >= fin) in spi_imx_clkdiv_1()
185 static unsigned int spi_imx_clkdiv_2(unsigned int fin, in spi_imx_clkdiv_2() argument
191 if (fspi * div >= fin) in spi_imx_clkdiv_2()
248 static unsigned int mx51_ecspi_clkdiv(unsigned int fin, unsigned int fspi, in mx51_ecspi_clkdiv() argument
257 if (unlikely(fspi > fin)) in mx51_ecspi_clkdiv()
260 post = fls(fin) - fls(fspi); in mx51_ecspi_clkdiv()
261 if (fin > fspi << post) in mx51_ecspi_clkdiv()
269 __func__, fspi, fin); in mx51_ecspi_clkdiv()
273 pre = DIV_ROUND_UP(fin, fspi << post) - 1; in mx51_ecspi_clkdiv()
276 __func__, fin, fspi, post, pre); in mx51_ecspi_clkdiv()
279 *fres = (fin / (pre + 1)) >> post; in mx51_ecspi_clkdiv()