msm: clock-8960: Lower frequency requirements of fpb active votes

We have an active set vote for the multimedia fpb and chip fpb so
that the registers are accessible whenever the processor is
awake. Unfortunately these requests are at the highest rate
supported which is not really necessary to ensure that the buses
are clocking. Lower the rate requests to the fastest speed that
doesn't require increasing voltages to allow the chip to hit low
voltages when the processor is awake.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 9e497f042d8525e57e11d417e9e37c2932a18dbf)

Change-Id: I3ee4926da0d953e7e31c3c64dffd11f6ee5edb72
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
msm: clock: Move voltage scaling to prepare/unprepare

Move the voltage calls to a sleepable context so we can avoid
spinning for hundreds of microseconds with interrupts disabled
waiting for a regulator to increase. This change also paves the
way to making the clock driver into a real regulator consumer
that uses the proper regulator APIs instead of the MSM specific
rpm_vreg API.

Doing this also requires us to make clk_set_rate() a sleeping
call so that concurrent clk_prepare() and clk_set_rate() calls
are synchronized. Making clk_set_rate() sleepable also
necessitates moving the clk_set_rate() call in clock-voter.c to a
sleepable context. Do that by having clock-voter aggregate and
update the rate in prepare/unprepare instead of enable/disable
(note that enable/disable of voter clocks implicitly calls
enable/disable on the parent via generic clock code).

Now that clk_set_rate() is sleeping, call clk_prepare() and
clk_unprepare() in the clock-local code when a rate change
requires reparenting the clock. This cleans up a problem we have
where sources may be left unprepared by a clock rate switch
(hence the default true warned flag for PLLs and crystals).

Change-Id: I493a00261055001a68fa884daa52e3d281ec6a2d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/clock-local2.c

Signed-off-by: Seongmin Park <r_data@naver.com>
msm: clock: Remove warned flag

Now that all clock consumers have moved over to using the
clk_prepare/unprepare APIs we can remove the warned flag that
used to indicate that we had already warned about improper usage
of the clock APIs. In particular, we used this flag to avoid
printing warnings for "source" clocks such as PLLs and
crystals that no consumer directly controls but that the clock
driver calls clk_enable() on during clk_set_rate().

Let's use a local variable for clk->dbg_name too because we use
it many times and it makes lines too long.

Change-Id: I3730d55e0ccc97eba60cca3f844602ae995ebda4
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/clock-8974.c

Signed-off-by: Seongmin Park <r_data@naver.com>
msm: clock-pll: Update PLL enable sequences for new processes

The PLL enable sequences across certain chipsets are
different due to differing manufacturing processes.
Update the PLL enabling sequences to reflect these
differences.

Change-Id: Iba1e515b20f49d1629c512ffce2919e4ce0874c3
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
msm: clock-8960: Add missing cam2_clk entry for 8064

There is a cam2_clk on 8064 so add the default "no-device" entry
so that this clock is properly registered.

Change-Id: Ib0505c7d8cc8499d420b7907a8e07cc6d42b8904
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Conflicts:

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

Signed-off-by: Seongmin Park <r_data@naver.com>
Revert "msm: clock-8960: Add missing cam2_clk entry for 8064"

This reverts commit 21e7e918b00b1ac443772fd523d1bebec5eded7b.
msm: cpufreq: Implement suspend/resume for cpufreq driver

Cpufreq suspend variable get's updated in kernel pm notifier
callback which gets called in process context. This will create
window where cpufreq governor may try to change the frequency
before suspend variable is updated while resume.

Define suspend/resume for cpufreq driver to update suspend variable
in atomic context.

Don't update the policy->cur upon cpufreq driver failure.

CRs-fixed: 423791
Change-Id: Id78705f5c3b8bf801c6253e9362299280903769f
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
Overclocking: limit initial max to system default

Signed-off-by: faux123 <reioux@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
mach-msm: enable retention on idle.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
Revert "msm: cpufreq: Implement suspend/resume for cpufreq driver"

This reverts commit 8d548e92fa24e62c8de4ee0dd7c58fba113f08ff.
Makefile: Change toolchain binary

Signed-off-by: Seongmin Park <r_data@naver.com>
msm: cpufreq.c: Fix cpu min/max clocks for hotplugs

Signed-off-by: Seongmin Park <r_data@naver.com>
Update gitignore

Signed-off-by: Seongmin Park <r_data@naver.com>
msm: Add Low/High CPU Clocks -Exp!!

Signed-off-by: Seongmin Park <r_data@naver.com>
Update defconfig

Signed-off-by: Seongmin Park <r_data@naver.com>
msm: Fix them

Signed-off-by: Seongmin Park <r_data@naver.com>
Merge branch 'test' into weekly