msm: cpufreq: Create cpufreq workqueue for freq changes

Setting frequencies may take unbounded amount of time, use private
workqueues instead of shared system workqueue.

Ondemand governor may post to the kernel workqueue, holds rwsem and
waits. This may cause msm_cpufreq_target to repost frequency change
request to the kernel workqueue waiting on the same rwsem resulting
in watchdog reset.

Change-Id: I34cf264e5f7f2f6aad2d2d2af3e4449233efd7d6
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
msm: cpufreq: Use INIT_COMPLETION instead of init_completion

INIT_COMPLETION should be used for repeated reset of completion
object after init_completion has been done once. init_completion
reinitalizes the head of the list which could be bad if there are
completion objects already waiting.

Change-Id: I0ccd912109eee59b130e8f2303e354f70ee56150
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
arm: Allow CPU-supported unaligned accesses

This change reconfigures the CPU to allow CPU-supported unaligned
accesses, which are generally faster than software-only fixups,
resulting in fewer alignment exceptions.

Signed-off-by: Brent DeGraaf <bdegraaf@codeaurora.org>
Reverted backt CAF released version for drivers/cpufreq/cpufreq.c
msm: Add sysfs interface for mfreq

Add mfreq interface in sysfs.  This forces the system to use the
maximum CPU clock on all CPU cores.
(mfreq=1 enables, mfreq=0 disables)

Signed-off-by: David Ng <dave@codeaurora.org>
(cherry picked from commit 14f38b6c25a3a63dc25fd4448c0b14171eabd59a)

Change-Id: I543098931798204cb3c431d245e279cc244b803b
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Updated OC freq table and voltages for 1.782 GHz
Added L2 Cache Bandwidth Boost.  Added L2 Cache Synchro for 1.566 GHz Table
Added Scaling_Available_Frequencies back to cpufreq sysfs interface
Clean up L2 Synchro code a bit
msm: acpuclock-8x60: Use hotplug notifications for CPU, L2, bus, voltage

Voltage and bandwidth requests from a CPU should be dropped when that
CPU is unplugged.  Subscribe to hotplug notifications to accomplish
this, replacing the calls to acpuclock from pm-8x60 in the hotplug path.

Now, a hotplug-removed CPU's clock, PLL, L2 vote, bus bandwidth vote,
and voltage votes are not removed until after the CPU has been shut
down. These settings are all restored to their previous values just
prior to bringing the CPU back online.

Change-Id: I1906bb6fc7e2083c3bbfedf31751c6862e671eea
CRs-Fixed: 280501
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Raj Kushwaha <rajk@codeaurora.org>
msm: pm-8x60: Remove redundant code for restoring ACPU clock rate

The acpuclock driver takes care of saving and restoring the CPU
frequency when hotplug removing and re-inserting a CPU.

Remove similar functionality for the pm-8x60 driver.  The CPU
frequency should have already been restored by acpuclock by the
time msm_pm_platform_secondary_init() executes.

(cherry picked from commit ef4f235b2e728e46fc03d2253c325d22987c1554)

Change-Id: Iac5e7fd5bb8177fd1fa8527747baa1e7f1a5c5ec
Signed-off-by: Raj Kushwaha <rajk@codeaurora.org>