clk: qcom: Update logic to recalculate rate of RCG
For RCG's that have enable_safe_config set to true, if rate
is set on the RCG while it is disabled, recalc rate causes
rate overflow than the highest voltage corner rate supported
by RCG if new source of RCG has much higher frequency than the
old source and divider value needed for new source is larger
than old source divider value.
This rate overflow is due to using old source divider value in
recalc_rate read from hardware that is not yet updated,
so if enable_safe_config is set to true use divider settings
from frequency table instead of reading it from hardware to
properly calculate the rate in recalc_rate.
Change-Id: I83472d416aaac20e58afcfc2414ab7793a265c49
Signed-off-by:
Jagadeesh Kona <jkona@codeaurora.org>
Loading
Please register or sign in to comment