Lines Matching refs:fin
188 static unsigned int spi_imx_clkdiv_1(unsigned int fin, in spi_imx_clkdiv_1() argument
194 if (fspi * mxc_clkdivs[i] >= fin) in spi_imx_clkdiv_1()
197 *fres = fin / mxc_clkdivs[i]; in spi_imx_clkdiv_1()
202 static unsigned int spi_imx_clkdiv_2(unsigned int fin, in spi_imx_clkdiv_2() argument
208 if (fspi * div >= fin) in spi_imx_clkdiv_2()
214 *fres = fin / div; in spi_imx_clkdiv_2()
440 unsigned int fin = spi_imx->spi_clk; in mx51_ecspi_clkdiv() local
442 if (unlikely(fspi > fin)) in mx51_ecspi_clkdiv()
445 post = fls(fin) - fls(fspi); in mx51_ecspi_clkdiv()
446 if (fin > fspi << post) in mx51_ecspi_clkdiv()
454 fspi, fin); in mx51_ecspi_clkdiv()
458 pre = DIV_ROUND_UP(fin, fspi << post) - 1; in mx51_ecspi_clkdiv()
461 __func__, fin, fspi, post, pre); in mx51_ecspi_clkdiv()
464 *fres = (fin / (pre + 1)) >> post; in mx51_ecspi_clkdiv()