Lines Matching refs:extal_rate
32 static int esai_get_clock_rate_config(uint32_t extal_rate, uint32_t hclk_rate, in esai_get_clock_rate_config() argument
45 if (!extal_rate || !hclk_rate || !bclk_rate) { in esai_get_clock_rate_config()
50 if (hclk_rate > extal_rate) { in esai_get_clock_rate_config()
55 if (bclk_rate > extal_rate) { in esai_get_clock_rate_config()
60 if (DIV_ROUND_UP(extal_rate, bclk_rate) > 2 * 8 * 256 * 16) { in esai_get_clock_rate_config()
62 bclk_rate, extal_rate); in esai_get_clock_rate_config()
67 if (DIV_ROUND_UP(extal_rate / 2, bclk_rate) == 1) { in esai_get_clock_rate_config()
78 if (hclk_rate > extal_rate / 2 && hclk_rate < extal_rate) { in esai_get_clock_rate_config()
85 if (extal_rate == hclk_rate) { in esai_get_clock_rate_config()
90 extal_rate /= 2; in esai_get_clock_rate_config()
93 hclk_div_ratio = DIV_ROUND_UP(extal_rate, hclk_rate); in esai_get_clock_rate_config()
99 extal_rate /= 8; in esai_get_clock_rate_config()
102 hclk_div_ratio = DIV_ROUND_UP(extal_rate, hclk_rate); in esai_get_clock_rate_config()
106 hclk_rate, extal_rate); in esai_get_clock_rate_config()
119 extal_rate = DIV_ROUND_UP(extal_rate, hclk_div_ratio); in esai_get_clock_rate_config()
124 extal_rate /= 2; in esai_get_clock_rate_config()
126 hclk_div_ratio = DIV_ROUND_UP(extal_rate, bclk_rate); in esai_get_clock_rate_config()
130 extal_rate /= 8; in esai_get_clock_rate_config()
132 hclk_div_ratio = DIV_ROUND_UP(extal_rate, bclk_rate); in esai_get_clock_rate_config()
143 hclk_div_ratio = DIV_ROUND_UP(extal_rate / i, bclk_rate); in esai_get_clock_rate_config()
144 bclk_div_ratio = DIV_ROUND_UP(extal_rate / hclk_div_ratio, bclk_rate); in esai_get_clock_rate_config()
157 bclk_rate, extal_rate); in esai_get_clock_rate_config()
162 bclk_div_ratio = DIV_ROUND_UP(extal_rate, bclk_rate); in esai_get_clock_rate_config()
166 bclk_rate, extal_rate); in esai_get_clock_rate_config()