acpuclock-krait: Disable vdd core boost
msm: cpufreq: Always update frequency limits when core is online

Remove condition in msm_cpufreq_init() so that when cpu is set to
online, it will call set_cpu_freq() and update the frequency limits.

CRs-Fixed: 462816
Change-Id: I40ac33c9cb4b42590a83f9d61b74f23379f5642e
Signed-off-by: Jennifer Liu <chihning@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/cpufreq.c
pm8921-bms: Stop kernel log spam
config: Increase kernel log buffer size
config: Enable KSM support
config: Disable warning for large stack frames
USB: ehci-msm-hsic: Fix unbalanced IRQ wakeup disable warning

Fix driver remove function to call disable_irq_wake only if
it was enabled.

Change-Id: I6efc28fce0555955e8f4769885d5226f202a5592
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
USB: ehci-msm-hsic: Apply PHY lockup workarounds only for affected cores

Some old version HSIC PHY has hardware BUG where due to a race condition
between h/w initiating SOF (start of frames) and finishing port reset
can cause PHY lockup. This may result in enumeration failure. Similar
race conditions exist for resume and suspend scenarios as well.
Currently driver is enabling software workarounds for the same on all
hardware revisions. As these BUGs are fixed on latest HSIC PHYs, make
the workaround selection configurable using DT or board files and enable
these only for the affected targets.

CRs-fixed: 471128
Change-Id: I37e88bdff1f664f8782d1bc5125a4fee1b3ea78d
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>

Conflicts:

	Documentation/devicetree/bindings/usb/msm-ehci-hsic.txt
	arch/arm/boot/dts/msm9625-v1.dtsi
	arch/arm/boot/dts/msm9625.dtsi
	drivers/usb/host/ehci-msm-hsic.c
ehci: hsic: add support for inactivity_clk

The inactivity clock for hsic is a clock that required for
enabling the hsic bam inactivity timer feature.

The inactivity timer feature is inactivity notification that
supported by the hsic bam hardware and trigger an interrupt
when no data is pulled or pushed on any of the bam pipes,
in both directions for some predefine duration.

Change-Id: I6ce1370a927b2a39534d73db917518ecbc56089a
Signed-off-by: Ido Shayevitz <idos@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.

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.

CRS-fixed: 452456
Change-Id: I22fd639134adbeb8f8f96603e285151480f537ec
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
msm: cpuidle: Don't disable irqs again

cpu_idle() disables irqs before calling down into the cpuidle
driver via cpuidle_idle_call(). Disabling irqs again in
msm_cpuidle_enter() is wasteful and unnecessary. It also inhibits
our ability to determine the largest irq latency when the cpu
idles for extended periods of time because the irqsoff trace is
reenabled when the irqs are disabled in msm_cpuidle_enter().

Note that we still reenable irqs before returning, as is required
by the ARM idle loop.

Change-Id: I925478d8fef88ab490959622bc68303f59cc6e79
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm: cpuidle: Update C state time stats in the cpu idle device.

msm_pm_idle_enter function returns time spent by cpu in particular
C state. Update the cpu idle device last residency with the return
value which is required for cpuidle stats.

CRs-fixed: 391456
Change-Id: If9f1b59e05c233e53ba37ae0fe9399f12275f3d8
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
msm: cpuidle: Remove preprocessor check for CONFIG_CPU_PM

The PM notifier API are stubbed out withtin cpu_pm.h if the
CONFIG_CPU_PM is not defined. So there isn't a need to enclose them
within #ifdef CONFIG_CPU_PM.

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

Conflicts:

	arch/arm/mach-msm/cpuidle.c
msm: spm: Add msm_spm_get_vdd() API for SAW v1 driver

Add msm_spm_get_vdd() API to return the core active voltage. This change
was added for SAW v2 driver, making this change for SAW v1 driver also.

Change-Id: If870bf26c24806ecf3f2102ec586f93eac8071d7
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
msm: spm: Add msm_spm_get_vdd API

Add msm_spm_get_vdd() API to return the core active voltage

Change-Id: I423ebbb424fd7ee41bf8283f30168112b78d87ab
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
msm: event_timer: Support to add event timers.

Add support to allow drivers to specify future events
that need to be treated as hard deadlines. Upon event timer
expiry the driver will be notified by callback function
that the driver provides.
The pm code can query the earliest event and modify
the event timer accounting for the back off based on the
latency of the low power mode being entered.

Change-Id: Iec26f77de3b826bff456b12f3230268d9bdc2255
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
msm: pm: Adjust for events with hard wakeups

Get the next event and setup a new timer to expire
earlier than the next event after accounting for the
latency of the low power state being entered. This
will ensure that the core is active to handle the event
when it arrives.

Change-Id: Ife3e165bc6b61e0109c692cf4675baef0f4290f0
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/pm-8x60.c
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>