msm_thermal: Initial Port of Myfluxi's Thermal Driver from N4
Signed-off-by: renderbroken <zkennedy87@gmail.com>
msm: thermal: cleaned unused code

Signed-off-by: renderbroken <zkennedy87@gmail.com>
nf: IDLETIMER: time-stamp and suspend/resume handling.

Message notifications contains an additional timestamp field in nano seconds.
The expiry time for the timers are modified during suspend/resume.
If timer was supposed to expire while the system is suspended then a
notification is sent when it resumes with the timestamp of the scheduled expiry.

Removes the race condition for multiple work scheduled.

Bug: 13247811

Change-Id: I752c5b00225fe7085482819f975cc0eb5af89bff
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
soc: qcom: rq_stats: remove the redundant iowait check

Iowait_time check is redundant and it would lead to heavy load
due to miscaluculation of idle time. Hence remove this check
as iowait will considered based on io_busy flag.

[myfluxi: Adapt to msm 8974]

Change-Id: I4dd9f9c79205eca588daea8cc0fe892394a83391
CRs-fixed: 662052
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
msm: hotplug: Remove the redundant iowait check
msm: cpr-regulator: change CPR_CORNER to CPR_FUSE_CORNER
New changes introduce virtual corner concept as opposed to cpr_corner.
Cpr corners in existing code are all cpr fuse corners. Hence change them
to distinguish cpr fuse corner from cpr virtual corner.

Change-Id: I086b29cadb23edfdff583f21f29efad4b35be5e1
Signed-off-by: Ke Liu <keliu@codeaurora.org>
Signed-off-by: renderbroken <zkennedy87@gmail.com>
ARM: dts: update frequency to corner and quot mapping on msm8226 and msm8610

Some devices need to adjust their CPR quotient value according to the cpu
frequency. The existing configuration uses the same fuse target quotient
for each frequency in a given corner. This configuration is not power
efficient as some corners have a large range of frequencies. Hence use a
virtual corner for each frequency for power saving purposes.

CRs-Fixed: 583719
Change-Id: I90113c4ad26c792c849378ec192bfde4ff2ec199
Signed-off-by: Ke Liu <keliu@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/msm8226-regulator.dtsi
	arch/arm/boot/dts/msm8610-regulator.dtsi
	arch/arm/mach-msm/acpuclock-8226.c
	include/linux/regulator/cpr-regulator.h

Signed-off-by: renderbroken <zkennedy87@gmail.com>
ARM: dts: msm8226: Allow power collapse as minimum l2 gdhs mode
This fixes warnings "IRQ40 no longer affine to CPUn". The switch
to C2 is also hardly understandable.

Thanks myfluxi!!
Signed-off-by: renderbroken <zkennedy87@gmail.com>
sched: window-stats: Fix overflow bug

Multiplication over-flow possibility exists in update_task_ravg() when
updating task's window_start. That would lead to incorrect accounting
of task load. Fix the issue by using 64-bit arithmetic.

CRs-Fixed: 665706
Change-Id: I92651c41efa6121bb8fe102e495ae956127b237a
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
PM / devfreq: Get priv data for msm-adreno-tz governor from dev_profile

The devfreq infrastructure has several bugs and general design flaws
with private governor data support. As a workaround the msm-adreno-tz
governor gets it's private data from the device driver by doing a
container_of on the dev_profile registered by the device driver.

[myfluxi: Adapt to 8974, add yet unused stuff for conservative governor]

Change-Id: Ib9dffd063fe3aa5cfd55727d41f7633e88b3f998
Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
Revert "sl[aou]b: merged with linux 3.8.x kernel"

This reverts commit 3cc3fa92773901ccdfcdd2d6757ec818baf09484.
Revert "msm: thermal: cleaned unused code"

This reverts commit e039714c8c19e80a70b124192ef2aa7fcf4674a8.
Revert "msm_thermal: Initial Port of Myfluxi's Thermal Driver from N4"

This reverts commit 4410b0292ca65f568f30f5dac0734be1afd102f7.
s2w/dt2w: implement Pocket mode and make the features usable in deep sleep THX to Alin23!!!

Signed-off-by: renderbroken <zkennedy87@gmail.com>
s2w/dt2w: separate PocketMode specific code THX to Alin23!!!

Signed-off-by: renderbroken <zkennedy87@gmail.com>
cpu: enable cpu-boost by default

Conflicts:
	ramdisk/init.render.post_boot.sh
PM: devfreq: Fix simple_ondemand crashing on startup
msm: ocmem: Do not use data mover for clearing ocmem memory

In the non secure environment the data mover is used to clear
the ocmem memory. The ocmem driver no longer uses the data
mover for this operation.

Change-Id: I2dc4f421b1a1a81d3205bd57fe66092512e287aa
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: ocmem: Call restore_sec_config() after every power collapse

As the QRIB is enabled, after every power collapse of ocmem, the
QRIB is reset to the maximum security state. Due to this the apps
processor cannot access the ocmem register space.

The restore_sec_config() scm call needs to be called before any
register is accessed after a power collapse to ensure that the
security configuration is restored. The clocks need to be turned
on before every call that is made into TZ to ensure that there
is no power collapse.

CRs-Fixed: 651324, 660089
Change-Id: Ieb6b635142057e219de29e811c93749f6500cec5
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: perf: tracectr: Initialize cnts after hotplug

Due to the mismatch between counter values saved across CPU hotplug
by perf and tracecounter logic, incorrect values are calculated for
first entry in trace buffer.
Ignore the first entry when CPU comes out of hotplug and set previous
counter values in this scenario.

Change-Id: Ieeeaa301d713f338f11f6e84aeb984a3708e45fc
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>