Lines Matching refs:scr_div

428 	uint32_t scr_div = freq / bclk;  in dai_ssp_find_mn()  local
432 if (freq % bclk == 0 && scr_div < (SSCR0_SCR_MASK >> 8) + 1) { in dai_ssp_find_mn()
433 *out_scr_div = scr_div; in dai_ssp_find_mn()
446 if (scr_div > 1 && scr_div % 2 != 0) { in dai_ssp_find_mn()
447 --scr_div; in dai_ssp_find_mn()
451 scr_div = MIN(scr_div, (SSCR0_SCR_MASK >> 8) + 1); in dai_ssp_find_mn()
454 while (scr_div > 1 && freq % scr_div != 0) { in dai_ssp_find_mn()
455 scr_div -= 2; in dai_ssp_find_mn()
459 mn_div = dai_ssp_gcd(bclk, freq / scr_div); in dai_ssp_find_mn()
462 n = freq / scr_div / mn_div; in dai_ssp_find_mn()
469 *out_scr_div = scr_div; in dai_ssp_find_mn()
487 static int dai_ssp_find_bclk_source(struct dai_intel_ssp *dp, uint32_t bclk, uint32_t *scr_div, in dai_ssp_find_bclk_source() argument
496 if (dai_ssp_find_mn(ft[mp->mclk_source_clock].freq, bclk, scr_div, m, n)) { in dai_ssp_find_bclk_source()
507 *scr_div = ft[i].freq / bclk; in dai_ssp_find_bclk_source()
514 if (dai_ssp_find_mn(ft[i].freq, bclk, scr_div, m, n)) { in dai_ssp_find_bclk_source()
573 uint32_t *scr_div, uint32_t *m, uint32_t *n) in dai_ssp_setup_initial_bclk_mn_source() argument
578 int clk_index = dai_ssp_find_bclk_source(dp, bclk, scr_div, m, n); in dai_ssp_setup_initial_bclk_mn_source()
637 uint32_t *scr_div, uint32_t *m, uint32_t *n) in dai_ssp_setup_current_bclk_mn_source() argument
644 if (dai_ssp_find_mn(ft[mp->bclk_source_mn_clock].freq, bclk, scr_div, m, n)) { in dai_ssp_setup_current_bclk_mn_source()
658 uint32_t *scr_div) in dai_ssp_check_bclk_xtal_source() argument