Skip to content
Commit c03d795b authored by Roman Volkov's avatar Roman Volkov Committed by Stephen Boyd
Browse files

clk: vt8500: rework wm8650_find_pll_bits()



PLL clock on WM8650 is calculated in the following way:

M * parent [O1] => / P [O2] => / D [O3]

Where O2 is 600MHz >= (M * parent) / P >= 300MHz.

Current algorithm does not met this requirement, so that the
function may return rates which are not supported by the hardware.

This patch fixes the algorithm and simplifies the code, reducing
the calculation time by ~10000 times (according to usermode app) by
removing the nested loops.

Signed-off-by: default avatarRoman Volkov <rvolkov@v1ros.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 27a0becc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment