Low CPU Clocks: Allow ultra low CPU frequencies for better battery performance

while screen is on or background operations like audio books and music

Signed-off-by: Paul Reioux <faux123@localhost.localdomain>

Conflicts:

	arch/arm/mach-msm/acpuclock-8064.c

Conflicts:
	arch/arm/mach-msm/acpuclock-8064.c
cpufreq: allow for low CPU clock policy when hotplugging new cores

Signed-off-by: faux123 <reioux@gmail.com>

Conflicts:
	arch/arm/mach-msm/cpufreq.c

Conflicts:
	arch/arm/mach-msm/cpufreq.c
EHCI: HSIC: Add support to vote for SVS digital voltage

HSIC HW can operate at SVS digital voltage when it is active.
Currently HSIC is voting for 120Mhz SFAB and 64Mhz DFAB clock
frequencies. Clock frequencies are directly proportional to SVS
voltage. If DFAB is running at 64Mhz or SFAB is running at 120Mhz
or higher SVS is not possible even though HSIC votes for it. Hence
do not vote for SFAB clock frequency and only vote for 32Mhz for
DFAB in order to allow SVS to happen. Voting for SVS voltage reduces
current consumption by 3mA in HSDPA network.

Change-Id: I8a6844efbbe90a8ea118be8450f8210717c2641b
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit cdf7fd2)
(cherry picked from commit f7f3688)
Signed-off-by: Paul Reioux <reioux@gmail.com>
msm: timer: Use 32768Hz GPT and SCLK on 8064 family

On 8064 SOC family, a dedicated XO is derived to support
sleep clock at 32768Hz unlike 8960 SOC family where TCXO
divider was used with effective freq. of 32765Hz.

CRs-fixed: 462079
Change-Id: I79142703c4ffac209f4dedeefebc235eeb8b140d
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/timer.c
CPU Overclock: initial overclock for Krait 600 (1.7 GHz variants)

overclocking up to 2.1 GHz

Signed-off-by: Paul Reioux <faux123@localhost.localdomain>

Conflicts:
	arch/arm/mach-msm/board-m7-regulator.c
	arch/arm/mach-msm/board-m7.c
msm: audio: qdsp6v2: Add size safety check to ACDB driver

Check that the size sent by userspace is not larger
then the internal amount allowed. This protects
against overflowing the stack due to an invalid size.

Change-Id: I8230fdb00a7b57d398929e8ab0eb6587476f3db1
CRs-fixed: 470222
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
msm: rq_stats: Fix missing initalization of cur_freq

Initialize cur_freq variable of each online cpu to the current
running cpu clock frequency. This avoids zeroing out the load
calculations until the first notification of the change in CPU
frequency comes in after CPUFREQ governors are intialized.

Also when a non boot cpu is up, update its cur_freq variable.

(cherry picked from commit 1633a48b16614e6b85c047a19ec93867c2ced3b3)

Change-Id: I950686deff02e2339eefae7d09392dda2174a545
CRs-fixed: 446017
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/msm_rq_stats.c
msm:rq_stats: Add hotplug disable attribute

Register for suspend and resume notifications from kernel. This should
be done as part of core_initcall so as to receive notification as close
as possible to the actual event. Add hotplug_disable attribute to
rq-stats node. Set/clear this attribute based on the suspend/resume events.

CRS-fixed: 452456
Change-Id: I76fee349b57f47df40785e9c2503e2e1cc6e064e
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
msm:rq_stats: Fix hotplug attribute during the suspend failure

If the system suspend fails, the hotplug_disable attribute remains
set. This prevents any change to core status from mpdecision. Reset
the value of this attribute if the module receives PM_POST_RESTORE
notification.

Change-Id: I22fd639134adbeb8f8f96603e285151480f537ec
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
msm:rq_stats: Register for Cpufreq policy notification

Currently the load of the system is calculated using the max
frequency that is read during startup(It does not get updated
when the policy changes). As a result, the average load of the
system is incorrectly calculated and the system might not bring
the cpus online to manage the additional load. This
reduces the performance of the system.

To fix this issue, register rq_stats to receive cpufreq policy
notifications. Update the policy's max frequency when a
notification is received and use that value to calculate the load.

Change-Id: Icc78e28c736c170e198f723fd96c13dfb2dafe8a
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
msm: cpufreq: Configure WQ for higer priority

When the workqueue runs at a lower priority, it gets starved by higher
priority threads. Bump the WQ priority to high to ensure cpufreq work
queue gets a fair scheduling chance

Change-Id: I9e994da94a347dceb884e72ec3dd3da468a4471d
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/cpufreq.c
arch/arm/mach-msm/htc_util.c: fix KERNEL_DEBUG compilation dependency

Signed-off-by: Paul Reioux <reioux@gmail.com>
arch/arm/mach-msm/Kconfig: decouple QCACHE from MSM board selection

Signed-off-by: Paul Reioux <reioux@gmail.com>
intelli/msm_thermal: initial coding for Qualcomm S4 Pro devices

an intelligent MSM thermal throttling kernel driver designed to replace the
closed sourced thermald(aemon) from Qualcomm.

The current driver can throttle the SOC via core frequency scaling or via
core hotplug with user configurable sysfs entries to adjust the throttling
temperature thresholds for each.

Derived from Qualcomm's Open source repo.

Signed-off-by: Paul Reioux <reioux@gmail.com>
workqueue: remove HTC's incompatible workqueue debug

Signed-off-by: Paul Reioux <reioux@gmail.com>
htc battery 8960: force fastcharge mode added
force fastcharge: htc battery 8960: unknown usb -> ac charger too
mach-msms:Kconfig: decouple Q-cache from M7 board selection

Signed-off-by: Paul Reioux <reioux@gmail.com>
board-m7: fix missing default intelli-thermal parameters

Signed-off-by: Paul Reioux <reioux@gmail.com>
GPU Overclock: initial GPU overclocking to 487.5 MHz

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	arch/arm/mach-msm/clock-8960.c