From: chenxing Date: Wed, 6 Nov 2013 01:32:49 +0000 (+0800) Subject: rk3026: i2s add several attempts to double confirm i2s frac effect X-Git-Tag: firefly_0821_release~6507 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=baf73f765d8cba3aacf1e4b015fa11afcbb14896;p=firefly-linux-kernel-4.4.55.git rk3026: i2s add several attempts to double confirm i2s frac effect --- diff --git a/arch/arm/mach-rk3026/clock_data.c b/arch/arm/mach-rk3026/clock_data.c index bacbbbe05cf8..ff6f981ec4c6 100755 --- a/arch/arm/mach-rk3026/clock_data.c +++ b/arch/arm/mach-rk3026/clock_data.c @@ -1687,12 +1687,18 @@ static struct clk clk_i2s_pll = { static int i2s_fracdiv_set_rate(struct clk *clk, unsigned long rate) { u32 numerator, denominator; + int i = 10; //clk_i2s_div->clk_i2s_pll->gpll/cpll //clk->parent->parent if (frac_div_get_seting(rate, clk->parent->parent->rate, &numerator, &denominator) == 0) { clk_set_rate_nolock(clk->parent, clk->parent->parent->rate); //PLL:DIV 1: - cru_writel_frac(numerator << 16 | denominator, clk->clksel_con); + while (i--) { + cru_writel_frac((numerator - 1) << 16 | denominator, clk->clksel_con); + mdelay(1); + cru_writel_frac(numerator << 16 | denominator, clk->clksel_con); + mdelay(1); + } CLKDATA_DBG("%s set rate=%lu,is ok\n", clk->name, rate); } else { CLKDATA_DBG("clk_frac_div can't get rate=%lu,%s\n", rate, clk->name);