slim_ngd: Handle error flags before handling SENT flag

It's possible that error flags were set alongwith SENT flag for
TX transaction status. In such a scenario, error flag status should
be handled (and SENT flag should be cleared). Move error-flag
handling ahead of SENT flag handling to avoid interrupt being called
twice, and completion being set twice.

Change-Id: I13f28df0a0448790069bd103422dc1cd6c7ac408
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
(cherry picked from commit 7201c4aa25bdc1c25a270395888efe536104aea7)
Reviewed-on: http://gerrit.mot.com/646737
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Sriram Divakar <sriramhd@motorola.com>
SLTApproved: Sriram Divakar <sriramhd@motorola.com>
Reviewed-by: Suresh Jayappa <dbfq36@motorola.com>
Reviewed-by: Robert Neely <wrn002@motorola.com>
Reviewed-by: Wenfeng Yan <wendyyan@motorola.com>
slim_ngd: Use QMI server up notification instead of APR for probing

Slimbus QMI-server can reside on any other remote processor.
Avoid depedency on APR (for APR state) by utilizing QMI server-up
notification for slimbus hardware initialization from apps processor.

Change-Id: I85e268d08e5c4cfc9c53513199784813200f0223
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
(cherry picked from commit 808b804b3ce3f764b665acf943ef02bab28e5582)
Reviewed-on: http://gerrit.mot.com/646738
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Suresh Jayappa <dbfq36@motorola.com>
Reviewed-by: Sriram Divakar <sriramhd@motorola.com>
SLTApproved: Sriram Divakar <sriramhd@motorola.com>
Reviewed-by: Robert Neely <wrn002@motorola.com>
Reviewed-by: Wenfeng Yan <wendyyan@motorola.com>
slim-ngd: change log level of slave_notify completion

Change the logging of slave_notify completion to debug to avoid
excessive logging.

Change-Id: Ie8e4ec1c7db786a20212f828d1432ea64e87ccd7
Signed-off-by: Naveen Kaje <nkaje@codeaurora.org>
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
(cherry picked from commit 40835498a1f55598cf95a2e1ce0e226e018630ac)
Reviewed-on: http://gerrit.mot.com/646739
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Sriram Divakar <sriramhd@motorola.com>
SLTApproved: Sriram Divakar <sriramhd@motorola.com>
Reviewed-by: Robert Neely <wrn002@motorola.com>
Reviewed-by: Wenfeng Yan <wendyyan@motorola.com>
Slim_ngd: Modify waiting mechanism in kthread

wait_for_completion_timeout() is not a good option in
kthread as it leads to scheduling the kthread on the every timeout.
Hence modify it to wait_for_completion() from
wait_for_completion_timeout().

Change-Id: Iaa29e997fd1cd5cb02f9ba44e69e1700b31736ae
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
(cherry picked from commit 824bb2b7d197f7d201a5b9d86161bcd6b10179ed)
Reviewed-on: http://gerrit.mot.com/646740
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Sriram Divakar <sriramhd@motorola.com>
SLTApproved: Sriram Divakar <sriramhd@motorola.com>
Reviewed-by: Suresh Jayappa <dbfq36@motorola.com>
Reviewed-by: Robert Neely <wrn002@motorola.com>
Reviewed-by: Wenfeng Yan <wendyyan@motorola.com>
Merge remote-tracking branch 'motorola/kitkat-mr2-release-peregrine' into cm-11.0-mr2