Commit graph

7 commits

Author SHA1 Message Date
Sagar Dharia
8957b9e33d slim: msm: Improve bulk message timeout error handling
If a bulk message times out due to interrupt starvation, a late
coming interrupt may access structures that are not valid.
Improve timeout error handling by resetting variables, and changing
relevant logging.

Change-Id: Ie0ee2fd9c2ce1628c69e1975fe713a2a26d9e716
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-03-23 21:17:20 -07:00
Sagar Dharia
1389ff19f5 slim: msm: Fix the instance number being sent to ADSP
Every bus instance can have 2 NGD devices. Fix the instance number
determination based on NGD device-id.

Change-Id: I515f4f09d58a7abc0c0322ca714b88fb847a0909
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-03-23 21:16:53 -07:00
Sagar Dharia
5e06ef1264 slim: msm: Set Device state to sleep in case of a suspend-timeout
If low-power mode is not entered due to timeout, it is possible that
HW has actually been turned off by ADSP but the response was not
received by driver on apps on time.
Change device state to sleep to make sure HW is woken up for
subsequent runtime-resume operation.

Change-Id: I4e454f7e90e1244985c86286b95202eecfc50a7e
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-03-23 21:16:12 -07:00
Sagar Dharia
9d9d7008b7 slim: msm: Return success for ch-remove type of messages during SSR
During SSR, all channels are removed and ports are disconnected since
slimbus HW is not functional. Return success to clients for such
calls so that client can mark channel/port state constistent with HW

Change-Id: I9b18f8e7ffe233090c9612d0811a7d36645d0329
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-03-23 21:15:51 -07:00
Sagar Dharia
ed2fedf0a5 slim_msm: Gracefully handle QMI timeout failures
QMI timeout can happen if other processor doesn't respond within the
time expected by slimbus driver on apps. It has been noticed that QMI
call to power-on slimbus rarely takes more than 500msec. Timeout
is increased to allow that possibility. Additionally, QMI channel is
drained out of left-over messages and runtime-PM state check is
modified to allow graceful handling of timeout if at all any timeout
still happens.

Change-Id: I392a4fa761735135a261fb543815823cee5eba41
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-03-23 21:13:24 -07:00
Girish Mahadevan
3dae886c11 slimbus: Remove use of PM_RUNTIME feature flag
Remove the use of PM_RUNTIME feature flag which is obsoleted on newer
kernel versions. Instead use PM feature flag to condiitionally compile
RPM callbacks.

Change-Id: I775c89f79b698bf3f20fdb655216027e58e7059d
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:36 -07:00
Girish Mahadevan
1f6c29a46f slimbus: Add snapshot of slimbus driver
Add snapshot of slimbus driver from msm-3.18 branch.
Baseline:
e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1

Change-Id: I82f8f91596d2c3e9ef111e26c80298d990f6c193
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:35 -07:00