msm: clock: Fix list rate to handle rate > LONG_MAX

While at it, also convert the list_rate return type from int to long to be
consistent with the rest of the ops.

Change-Id: Ib5bc230d82472d17ddcc99956cb6f10ff21df5ff
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
msm: clock: Add pre_set_rate and post_set_rate ops

Some clocks might need to perform additional steps before/after a voltage
changes happen during a rate change. To accomodate such clocks and similar
requirements from new clock types in the future, add generic
pre/post_set_rate ops that are called before any HW state change is done
for set rate.

Change-Id: I07e4f79136028aaae5dee6d66d18b45c445f325b
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
msm: clock-dummy: Rate-setable independent dummy clocks

Previously dummy clocks share same underlying clk struct.  clk_get_rate()
always returns 0.  Add a new macro DEFINE_CLK_DUMMY to create different
dummy clocks.  These clocks remember last set rate and return it for
clk_get_rate().  This is necessary for fake clocks to return desired
rate in virtio.

For any dummy clock that might need to handle clk_get_rate(), the new
macro is recommended.

Change-Id: I3a279edf6e41a0ae2777400adf992a9f26d77287
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
msm: clock: Add is_better_rate() helper function

The is_better_rate() function is meant for use in clk_round_rate()
implementations to check if one of the new possible rates is better than
the current best match for the round rate request.

Change-Id: Ifca1840b15ec6faf6031af35ca9d219f6b32c3bb
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
cache_erp: Use seq_printf and modernize procfs code

In future kernels create_proc_entry() is going to be removed.
Let's modernize this code and use regular file operations and
seq_printf() to avoid experiencing compilation problems in future
kernels.

Change-Id: Ifc11287a8aefa8b2af3fb7d68fd96c1db8f2f098
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Revert "msm: iomap: Remove GIC mappings for device tree targets"

This reverts commit 4baedc0dafac1e4bc03181dfc6dd9e54cadbb146
so that pm-8x60 may resume use of these mappings.

Minor context conflicts have been resolved, and corresponding
8x10 changes have been made (which were not part of the original
commit).

CRs-Fixed: 550405
Change-Id: I838999faf1adb49bbd42f66b3c663e1d5aadef6b
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>