Lines Matching full:sysclk

143 	int sysclk;  member
622 * wm8960_configure_sysclk - checks if there is a sysclk frequency available
623 * The sysclk must be chosen such that:
624 * - sysclk = MCLK / sysclk_divs
625 * - lrclk = sysclk / dac_divs
626 * - 10 * bclk = sysclk / bclk_divs
629 * @mclk: MCLK used to derive sysclk
630 * @sysclk_idx: sysclk_divs index for found sysclk
635 * -1, in case no sysclk frequency available found
636 * >=0, in case we could derive bclk and lrclk from sysclk using
643 int sysclk, bclk, lrclk; in wm8960_configure_sysclk() local
653 /* check if the sysclk frequency is available. */ in wm8960_configure_sysclk()
657 sysclk = mclk / sysclk_divs[i]; in wm8960_configure_sysclk()
659 if (sysclk != dac_divs[j] * lrclk) in wm8960_configure_sysclk()
662 diff = sysclk - bclk * bclk_divs[k] / 10; in wm8960_configure_sysclk()
682 * - sysclk = lrclk * dac_divs
683 * - freq_out = sysclk * sysclk_divs
684 * - 10 * sysclk = bclk * bclk_divs
686 * If we cannot find an exact match for (sysclk, lrclk, bclk)
692 * @sysclk_idx: sysclk_divs index for found sysclk
698 * >=0, in case we could derive bclk, lrclk, sysclk from PLL out using
706 int sysclk, bclk, lrclk, freq_out; in wm8960_configure_pll() local
719 * 90MHz and 100MHz, the desired sysclk output is 11.2896MHz in wm8960_configure_pll()
727 sysclk = lrclk * dac_divs[j]; in wm8960_configure_pll()
728 freq_out = sysclk * sysclk_divs[i]; in wm8960_configure_pll()
734 diff = sysclk - bclk * bclk_divs[k] / 10; in wm8960_configure_pll()
765 * may not work if the sysclk is not configured, to avoid such in wm8960_configure_clocking()
766 * compatible issue, just add '!wm8960->sysclk' condition in in wm8960_configure_clocking()
769 if (!(iface1 & (1 << 6)) && !wm8960->sysclk) { in wm8960_configure_clocking()
782 * If it's sysclk auto mode, check if the MCLK can provide sysclk or in wm8960_configure_clocking()
783 * not. If MCLK can provide sysclk, using MCLK to provide sysclk in wm8960_configure_clocking()
788 /* disable the PLL and using MCLK to provide sysclk */ in wm8960_configure_clocking()
791 } else if (wm8960->sysclk) { in wm8960_configure_clocking()
792 freq_out = wm8960->sysclk; in wm8960_configure_clocking()
794 dev_err(component->dev, "No SYSCLK configured\n"); in wm8960_configure_clocking()
816 /* configure sysclk clock */ in wm8960_configure_clocking()
947 * If it's sysclk auto mode, and the pll is enabled, in wm8960_set_bias_level_out3()
1073 * If it's sysclk auto mode, and the pll is enabled, in wm8960_set_bias_level_capless()
1329 wm8960->sysclk = freq; in wm8960_set_dai_sysclk()