msm: socinfo: Support additional MSM8974 IDs.

Update the SoC ID mapping table to support additional
MSM8974 chip IDs.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit 2f06d83b5bb1a0c7294f53987f1efd8fef269719)
(cherry picked from commit 9420984c0717a640b38c9a505e7b09dac852ef97)

Change-Id: I95e426fb81e3a57adacd1358c5ccfc04638412d5
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
arm/dt: msm8974: Update MSM ID properties

Update the qcom,msm-id property in MSM8974 device tree
files to indicate support for additional MSM8974 SoC IDs.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit 3d8befb4c8be602cea2860a31669d1ef703d2774)
(cherry picked from commit 1d7f889f8c5381830d64554a35f74d8557c8f9fe)

Change-Id: I05186e739d8f0022e2232c5b04b719b330bb406b
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
msm: gdsc: Allow core logic collapse to be disabled via device-tree

Introduce an optional device-tree binding that can be used to
keep the core's logic powered, but still allow its memories
to collapse.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
(cherry picked from commit 7889c71557ecd82695d56305233d0b629194c691)
(cherry picked from commit 60ee524a5d04c885a1bcd1cc6501cacf8f23f73e)

Change-Id: Id3cf65b9e9abea82313bc2bde16f1d984140d1b8
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
arm/dt: msm8974: Disable Venus core logic collapse via its GDSC

For improved system CX voltage stability, disable core logic
collapse for Venus.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
(cherry picked from commit 3ebaa9ca5e5c3360450e22a1e35ca04cdd138ce5)
(cherry picked from commit a3cf8285471335287d401a9782f14f63f0b9e1e7)

Change-Id: Iaf20793b2709c235082b465ec164ed5c76f02809
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
msm: clock-8974: Add reset support for venus0_vcodec_clk

The video driver needs to be able to reset the video core between
clips, even if power is not collapsed at the GDSC. Add support for
use of clk_reset() to control the VENUS0_BCR  register.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
(cherry picked from commit fe4f698b656bd055116c0795910f6ca4993ae3b0)
(cherry picked from commit 33616a1f4bf387fbadd4db1ed38ae09525836b1b)

Change-Id: Ie853f15985cf4dfb200ac202bb9115a10cec7144
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
msm: clock-local2: Remove warning when clk_reset() is not supported

Some driver (such as GDSC) may want to, for convenience, call
clk_reset() on a list of clocks, some of which may not support
the feature. Continue to return an error, but don't print a
warning in these cases.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
(cherry picked from commit d8d735da8ebc8000e529249c5e38e23181e2df58)
(cherry picked from commit 2e365c30d7339b3b509013c1b1146e5329aaf7d5)

Change-Id: If5e56b3906f646e45e4e5a97dfc3a9f54197f380
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
msm: gdsc: Replace 'retain-logic' property with 'skip-logic-collapse'

Clients of the GDSC driver may expect the state of the core to be
reset following a GDSC disable and re-enable. Replace the unused
'retain-logic' property with a 'skip-logic-collapse' property,
which similarly keep the core powered, but also forcefully resets
it via clock APIs calls.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
(cherry picked from commit af0ea3359c20fb5a1c8e5a99420bef10793035ae)
(cherry picked from commit e76d6d224ef54797725a3c44434b493e46d57c1e)

Change-Id: I4fce9fbbab62bf899add1ba9c423483b722c7d15
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
diag: Fix array out of bounds access

The processing of the buf_tbl array is resulting in access beyond
the end of the array. Make modifications to ensure that the buf_tbl
array is accessed properly within bounds.

CRs-Fixed: 488175

Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
(cherry picked from commit a6d9809b91caa9cffe21c312240e25edfda2e761)

Change-Id: I87d15f4dbe98b106501a5d678695462ec28fe5a3
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
(cherry picked from commit e40cf4b2c723441451be19611d25400e1d73b86b)

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Merge "msm: socinfo: Support additional MSM8974 IDs."
Merge "arm/dt: msm8974: Update MSM ID properties"
Merge "msm: gdsc: Allow core logic collapse to be disabled via device-tree"
Merge "arm/dt: msm8974: Disable Venus core logic collapse via its GDSC"
Merge "msm: clock-8974: Add reset support for venus0_vcodec_clk"
Merge "msm: clock-local2: Remove warning when clk_reset() is not supported"
Merge "msm: gdsc: Replace 'retain-logic' property with 'skip-logic-collapse'"
Merge "diag: Fix array out of bounds access"