clk: mpll: fix audio not sound issue

PD#170386: clk: fix audio not sound

Change-Id: I0396c6e2447162995964914fa7adb9f35ff651f0
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
This commit is contained in:
Shunzhou Jiang
2018-08-20 10:14:10 +08:00
committed by Jianxin Pan
parent 54e7d90d87
commit c4f9d4db05

View File

@@ -121,7 +121,7 @@ static int mpll_set_rate(struct clk_hw *hw, unsigned long rate,
do_div(rate64, rate);
n2 = rate64;
rate64 = (parent_rate - n2 * rate) * SDM_MAX;
rate64 = (parent_rate - n2 * rate) * SDM_MAX + rate - 1;
do_div(rate64, rate);
sdm = rate64;
pr_debug("%s: sdm: %lu n2: %lu rate: %lu\n", __func__, sdm, n2, rate);