msm: idle-macro: L2 cache flush optimizations

Following suggestions are made by HW team to optimize the
L2 cache flush code.

1. wait should be for 8 ways as we have only 8 ways , value change from
FFFF (16 ways) to FF (8ways).
2. For the PL310 the sync wait is not needed.
3. add dsb for cache controller register writes.

Change-Id: Idd48e2efabc04b4f913e4b5f1ef8d9fbefb1072f
CRs-fixed: 467112
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
i2c: i2c-algo-bit: Add support for bus recovery

If I2C master stops in the middle of I2C transaction, to a
slave, the it may leave the slave device in an incomplete
state. Typical case is master fails when doing a read operation
in a slave. SDA line is non usable anymore because of the
"Slave-Transmitter" mode.

Methods to recover the SDA line:
 1. Reset the slave device (if it has Reset pin)
 2. Use bus recovery sequence.

Bus recovery sequence steps:
 1. Master tries to pull up SDA line
 2. Master generates a clock pulse on SCL (1-0-1 transition)
 3. Master checks SDA. If SDA = 0 goto Step 2 until 9 iterations
    completed; if SDA = 1 goto Step 4.
 4. Master sends a STOP command initializing completely the bus.

Add recovery support for i2c-gpio bit bang driver during
registration of adapter. Call the bus recovery if SDA is
low before starting a new i2c transaction.

CRs-Fixed: 468622
Change-Id: I115a1bc20defbdf6412fd0eb5d4436f550136a0f
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Merge "msm: idle-macro: L2 cache flush optimizations"
msm-camera:Fix for ZSL flicker in ov5647
Change in register setting of AEC.

Change-Id: I47eaff2938309ae052f55fa2980d1b35c75e3e68
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
Merge "i2c: i2c-algo-bit: Add support for bus recovery"
Merge "msm-camera:Fix for ZSL flicker in ov5647 Change in register setting of AEC."
msm: pm2: Send SMSM RESET request to modem

On some senarios when the APPS initiate the PC
seqeunce it informs to modem and wait for MODEM
response back within 2.5sec. If it did not happens
then APPS moves to an indefinite loop and not
responde to any modem communication. This causing
the FS dog timeout after 532sec which is quite
a long time where modem do an ERR fatal.

Send SMSM RESET request to modem when there
is a timeout on APPS (> 2.5sec). This change
will reset the target when the timeout on APPS
is more than 2.5sec.

(Here the time is 50000*50 us = 2.5 Sec)

CRs-fixed: 469075
Change-Id: Ic60eb6d6ea4a791776f5ad2bc93a58288474fcc7
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
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: Goberu Gopal <ggober@codeaurora.org>
(cherry picked from commit d39b199d76430d2fc341bb4e63338eb31fb408cd)
Revert "Revert "Revert "Revert "msm: 7627a-defconfig: Enable CMA""""

This reverts commit 39aa3825537a8ebd6abaecb31343f4ffff398a37

Change-Id: Idc6321e8a61043779337557cf396ab883935ad0f
Merge "msm: cpufreq: Implement suspend/resume for cpufreq driver"
Merge "Revert "Revert "Revert "Revert "msm: 7627a-defconfig: Enable CMA"""""
Merge "msm: pm2: Send SMSM RESET request to modem"