[PATCH] prima: completely disabled logging

reduces kernel module size from 2.3 Mb to 1.7Mb

Change-Id: I32af66653a6b0f5df21c1ebdaa39b594a4e1f8ce
msm: acpuclock-8960: adjust max_vdd code to CAF
[PATCH] Revert "msm: acpuclock-8960: Enable Krait v1 workarounds on Krait v2"

This reverts commit 2c9fe8d57020f67044f740ffd854e0ab030f35a0.

Change-Id: Ic986f96809b1ac99f663cf58644b8fc12fae8d0a
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: acpuclock-8960: cherry-pick of CAF commit bc2e95782c7e60aca0f4486b563223ab9bfc751d

[PATCH] msm: acpuclock-8960: Activate 8064 acpu frequency scaling

Do the following to enable the acpuclock driver
on the 8064:

1. Add new regulator consumer entries for krait2
   and krait3.
2. Remove cpu_is_* calls thus enabling bus and
   voltage scaling calls on the 8064.
3. Remove the stub in the cpufreq driver that
   prevents it from initializing on the 8064.
4. Add a call to the acpuclock init function in
   the 8064 board file, after the bus driver's
   init call.

Change-Id: I4f47f51241826b4056b40b012e964a9527db58f5
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[PATCH] msm: acpuclock-8960: Add HFPLL regulator voting for 8064

8064's HFPLLs are powered by LVS7. Update the code to reflect
this.

Change-Id: Id091453cb20caebdc81cfb6920352ad3bb73734d
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
[PATCH] msm: rpm-regulator: add RPM regulator support for MSM8930

MSM8930 boards utilize the new PMIC PM8038.  Add a new
rpm-regulator data file which defines all of the regulators
available via the RPM for MSM8930 boards.

The regulator definitions describe both the physical properties of
the regulators and the RPM interface format used for each type of
regulator.

Change-Id: If4bdbaf3f6d22b905bf7334d681410fcddff9b7b
Signed-off-by: David Collins <collinsd@codeaurora.org>
[PATCH] msm: acpuclock-8960: Update regulator support for 8930 and 8627

8930/8627 uses the new pmic pm8038 so need to update the regulators
used by acpuclock driver to the corresponding pm8038 regulators.

Change-Id: I7771236cc1eed6f7b28fb456a4e8fbaa60544cc1
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
[PATCH] msm: acpuclock-8960: Skip HFPLL regulator during PLL reprogramming

When briefly disabling HFPLLs to reprogram their rates, there is
no need to de-assert and re-assert requests for the PLL's power rails.
Skip these the regulator enable/disable steps to save potential latency
waiting for the regulator calls to return.

Change-Id: I1f00b00123178a27655fd0d70834ac809149e694
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
[PATCH] msm: acpuclock-8960: Initialize regulators and bus_bw earlier

The init code assumes that the regulators have already been set
up to support the max CPU frequency. While this is true, the
fewer assumptions we make, the better. So, switch the ordering to
initialize the regulators before switching the frequency. This
also has the nice side-effect of not running the regulators at a
higher than required voltage for fast parts.

While we are at it, also change the bus init ordering so that we
can pick the bus bandwidth that corresponds to the freq the L2
will be initialized to instead of picking the max bandwidth
defined in the bandwidth table.

Change-Id: I58432f6e236a7077536e6565157b96c309df590d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[PATCH] msm: acpuclock-8960: Select QSB clock source during 8064 hotplug-remove

8064v1.0 hardware is subject to the requirement that the QSB clock
source must be selected prior to power-collapse to prevent a potential
clock source switching issue that may result in a CPU lockup. This is
similar to Kraitv1, so apply the Kraitv1 workaround to 8064.

Change-Id: I046f1a141fb6f033c616cb2c506d0838df1f5b13
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
[PATCH] msm: acpuclock-8960: Skip regulator on first hfpll disable

When the HFPLLs are first initialized we don't want to direct the
RPM to disable the regulators for the HFPLLs until all the PLLs
are configured. Otherwise we'll end up in a situation where an
HFPLL is enabled but the regulator for the HFPLL is disabled.

For example, when the first HFPLL is initialized we may be in a
state where both CPUs are running at 918MHz using their
respective HFPLLs. When hfpll_init() disables the first CPUs PLL
to reconfigure its speed it will disable the PLL with
hfpll_disable(). The regulator driver will see that there are no
other votes for the regulator (even though the other CPU is using
its own HFPLL) and then disable the supply used for all the
HFPLLs.

Skip disabling the regulator on the first hfpll_disable() so that
we properly initialize all the votes for the regulators from the
PLLs and only drop the votes once all votes are initialized. If
the regulator APIs were in use there would have been an
unbalanced disable warning printed.

Change-Id: Id8c13e3076845d39b46a903296ed61d96490521d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[PATCH] msm: acpuclock-8960: Fix regulator-related debug prints

Regulator names are not printed in all regulator-related debug messages.
Fix this and remove the duplicate __func__ prefix for these messages.

Also, the regulator names 'krait0_dig' and 'krait0_mem' were assigned for
all CPUs, not just Krait 0.  Change this so the number in the regulator
name matches the CPU number the regulator is associated with.

Change-Id: I1843d30670c44434f8f190a2b8d7fda71c308357
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm: acpuclock-8960: cherry-pick of CAF commit d750d74025c0e5f50c7b2790eb74fb45024c3c14

[PATCH] msm: acpuclock-8960: Update Krait frequency/voltage data for 8064

Apply new frequency/voltage data to support Krait freq up to 1.5GHz and
L2 freq up to 1.1GHz. Also update bus bandwidth request corresponding to
new freq plan. In addition, update the voltage constraints for Kraits'
regulators to support the voltage levels required by higher Krait freqs.

Change-Id: I1521c8568a870890012ce71ca6e3ce10a9c4c32c
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
[PATCH] msm: rpm-regulator: Allow rpm_vreg_set_voltage voltage switch control

Modify the rpm-regulator driver so that rpm_vreg_set_voltage
supports voltage switch type regulators which do not have a
voltage setting.

For these types of regulators make rpm_vreg_set_voltage calls
map as follows:
1. max_uV  > 0 --> vote to enable the voltage switch
2. max_uV == 0 --> vote to disable the voltage switch

This modification is needed so that the acpuclock driver can call
rpm_vreg_set_voltage successfully for a voltage switch on the
APQ8064 platform.

Change-Id: Ibde2ded8fe578cb82e0a3bc28cdf046017583e06
Signed-off-by: David Collins <collinsd@codeaurora.org>
[PATCH] msm: rpm-regulator: Add support for new voltage corner RPM regulator type

Add support in the rpm-regulator driver for the new voltage corner
RPM regulator resource type.  Resources of this type allow for
consumers to request a voltage corner in low, nominal, and high
range instead of using a discrete voltage value.  This is useful
for rails whose voltage can be tuned based on the speed inherent
in the silicon of the specific chip that is being run on.

Also rename vreg_enable and vreg_disable functions to avoid check
patch warnings.

Change-Id: I32f5d13565ca777f9a49adbcfde297dfe3b11197
Signed-off-by: David Collins <collinsd@codeaurora.org>
[PATCH] msm: rpm-regulator: Add support for MSM8930 voltage corner regulator

Specify the low level configuration values for the new VDD_dig
voltage corner RPM regulator resource on MSM8930.

Change-Id: I4de707b012971f212bef724483bb6a9f7b98fe30
Signed-off-by: David Collins <collinsd@codeaurora.org>
[PATCH] msm: acpuclock-8960: Use VDD dig corner regulator for 8930 and 8627

The VDD dig corner type regulator is introduced to 8930 and 8627. It
allows voting on the logical VDD dig levels without having to deal with
the specific voltages that correspond to each logical VDD dig level.
This allows the RPM to optimize the actual voltage that corresponds to
each logical level based on hardware characteristics.

Change-Id: I294176001c2a21848e88550e09599d5cb74554fa
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
[PATCH] msm: acpuclock-8960: Increase bus bandwidth for 8930

8930 support larger bus bandwidth therefore update the
request accordingly. This makes the bandwidth requests
made on 8930 consistent with those of 8064.

Change-Id: I922351845705dc88a84b12c84857aaf1dc3a05b9
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
[PATCH] msm: acpuclock-8960: Clean up krait rail voltage calculation

Previously, the krait rail voltage is calculated by the maximum
of krait core voltage and the hfpll voltage given a freq level.
However, the hfpll voltage has been taken into account when
the hardware designers provide the krait core voltage value
for each freq level, which means this voltage is good for the
hfpll as well. Therefore, clean up the calculation by just using
the krait core's voltage.

Change-Id: I1706de84aa227e47b3018e84a68194fc90ca5001
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
[PATCH] msm: acpuclock-8960: Remove need for first_set_call flag

The first_set_call flag was used to ensure that initial voltage and bus
requests were asserted during the first call to acpuclk_set_rate(),
which would have otherwise returned early if the CPU was already set to
the target speed from init. This was unclean, and depended on
acpuclk_set_rate() being called during boot (before vdd_dig, vdd_mem,
and bus clocks were allowed to scale).

As of commit cfe192bebeb2eaa82b483735e5f8ee5da8c097af, bus bandwidth
and Krait voltage requests are already initialized during init and no
longer rely on the first_set_call flag. If vdd_dig and vdd_mem requests
are also initialized at that same time, we can remove our dependence on
the flag altogether. Do this.

Change-Id: I9adb5865bf90a8a781b82f1d2c5b9154848c90ad
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>