Commit 2a61899c authored by Praveen Chidambaram's avatar Praveen Chidambaram Committed by Sudhir Sharma
Browse files

msm: AVS: Refactor and clean up avs_hw.S to avs.c



Refactor AVS API to a cleaner C implementation. The new implementation
uses C assembly functions and provides a cleaner way for future targets
to add new AVS functionality.

Also fixed a possible issue with the earlier AVS_ENABLE and AVS_DISABLE
implementations. The earlier implementation did a get_cpu() and compared
it against the cpu for which AVS was to to be disabled, if the cpu's did
not match then it did not return an error and avs could have been left
enabled during the voltage change. In this new implementation, enable
and disable use smp_call_function_single() to ensure that the enable and
disable indeed happen on the core requested.

If acpuclock_set_rate() was called on the right core correctly during
cpufreq frequency change, there would have been no issue, but newer
implementation of mach-msm/cpufreq.c does not gaurantee that.

Change-Id: I94db3fc70341ceb79d747d54c7f525056b377755
Signed-off-by: default avatarPraveen Chidambaram <pchidamb@codeaurora.org>
(cherry picked from commit 5e6141182f2a3638aaa04ed399643c013e414a65)
parent e37d5b9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment