• Praveen Chidambaram's avatar
    msm: AVS: Refactor and clean up avs_hw.S to avs.c · 5e614118
    Praveen Chidambaram authored
    
    
    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>
    5e614118
avs.c 1.88 KB