Lines Matching refs:speed_hz
883 static u32 omap2_mcspi_calc_divisor(u32 speed_hz) in omap2_mcspi_calc_divisor() argument
888 if (speed_hz >= (OMAP2_MCSPI_MAX_FREQ >> div)) in omap2_mcspi_calc_divisor()
902 u32 speed_hz = spi->max_speed_hz; in omap2_mcspi_setup_transfer() local
911 if (t && t->speed_hz) in omap2_mcspi_setup_transfer()
912 speed_hz = t->speed_hz; in omap2_mcspi_setup_transfer()
914 speed_hz = min_t(u32, speed_hz, OMAP2_MCSPI_MAX_FREQ); in omap2_mcspi_setup_transfer()
915 if (speed_hz < (OMAP2_MCSPI_MAX_FREQ / OMAP2_MCSPI_MAX_DIVIDER)) { in omap2_mcspi_setup_transfer()
916 clkd = omap2_mcspi_calc_divisor(speed_hz); in omap2_mcspi_setup_transfer()
917 speed_hz = OMAP2_MCSPI_MAX_FREQ >> clkd; in omap2_mcspi_setup_transfer()
920 div = (OMAP2_MCSPI_MAX_FREQ + speed_hz - 1) / speed_hz; in omap2_mcspi_setup_transfer()
921 speed_hz = OMAP2_MCSPI_MAX_FREQ / div; in omap2_mcspi_setup_transfer()
980 speed_hz, in omap2_mcspi_setup_transfer()
1165 (t->speed_hz != spi->max_speed_hz) || in omap2_mcspi_transfer_one()
1171 if (t->speed_hz == spi->max_speed_hz && in omap2_mcspi_transfer_one()