msm: clock: backport updates from CAF msm-3.4 - part 1
_____________

msm: clock: Remove the clk_set_min_rate() API and set_min_rate ops

This API is now unused. Since it is proprietary and not a generic
kernel API, remove it. Also remove use of the min_rate ops for all
clock except proc_comm clocks, for which CLKFLAG_MIN is still used.

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

msm: msm_bus: Use device names to distinguish between clocks

Populate the device name fields for bus clocks in the clock tables and
adapt a common clock naming scheme that is common for all bus and memory
clock across targets. Also replace the NULL device pointers passed to
clk_get() with either a real device pointer (where possible) or a call
to clk_get_sys().

All clocks used by the bus driver are now called "bus_clk", "bus_a_clk",
"mem_clk", "mem_a_clk, or (for 8660 only) "smi_clk" and "smi_a_clk".

clk_get() is used for all bus clocks since they have Linux devices
associated with them. Memories do not, so clk_get_sys() is used for them
for now.

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

msm: pil-8660: Break off Q6v3 boot code into platform driver

Create a platform driver to manage the Q6v3 instead of having a
module that exists for any 8660 target. This allows us to add
platform devices when the device really exists.

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

msm: clock-local: Implement rcg_clk_reset

Instead of duplicating the simple soc_clk_reset() function for
each SoC's rcg clock, implement a generic rcg clock reset
function. 7x30 is different, but that's ok because we already
have a separate reset function for 7x30.

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

msm_xo: Make clock users vote on CXO_CLK instead of buffers

Users of internal MSM clocks derived from CXO should vote on the
CXO_CLK RPM resource rather than just the XO buffer resource. Voting
on CXO_CLK ensures the entire clock tree from the PMIC through to the
MSM clock controller is running, whereas voting for the buffer does
not guarantee the clock will not be gated off within the MPM.

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

msm: scm-pas: Request bandwidth for auth_and_reset()

The secure processor doesn't have the capability to request
bandwidth itself. Add bandwidth requests for it so that
performance doesn't suffer.

The bus driver is lacking a couple features:

 (1) No control of daytona fabric

 (2) No endpoints for the crypto engine on the daytona fabric

Solve (1) with a clock voter on daytona fabric and (2) with a
bandwidth request for SPS which lives on the daytona fabric.

Change-Id: Ib6ca67043bc3b97dbbecb1b571c4d33721fae11c
CRs-Fixed: 319454
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
___________________

msm: footswitch-8x60: Update clock management code

Some footswitches (such as FS_MDP) require more than the standard
three clocks to be managed as part of the collapse and restore
sequences.  Additionally, the list of required clocks may differ
from SoC to SoC.

Rewrite the clock management to support arbitrarily long lists
of clocks with and without rate requirements. Also, update the
list of MDP-related clocks to include all of those required for
reliable collapses and restores.

CRs-Fixed: 317383
Change-Id: If92d589104095b240e8f95085868e90d3e22f48d
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
____________________

msm: clock: Consolidate macro definitions

There is no reason we can't move these common macro definitions
to clock-local.h which is included by all local clock drivers.

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