mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
msm: mhi_dev: Adding mhi and pcie state change logs to console
Adding mhi and pcie state change logs to console to make testing and debugging easier. Change-Id: I1fe176fc532a99de9de862ad556df831b6db6bf6 Signed-off-by: Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
This commit is contained in:
parent
8876d1c1a1
commit
02ccb1d6dd
3 changed files with 15 additions and 11 deletions
|
|
@ -1482,7 +1482,7 @@ static void mhi_hwc_cb(void *priv, enum ipa_mhi_event_type event,
|
|||
return;
|
||||
}
|
||||
|
||||
mhi_log(MHI_MSG_CRITICAL, "Device in M0 State\n");
|
||||
mhi_log(MHI_MSG_INFO, "Device in M0 State\n");
|
||||
break;
|
||||
case IPA_MHI_EVENT_DATA_AVAILABLE:
|
||||
rc = mhi_dev_notify_sm_event(MHI_DEV_EVENT_HW_ACC_WAKEUP);
|
||||
|
|
@ -3518,7 +3518,7 @@ int mhi_dev_write_channel(struct mhi_req *wreq)
|
|||
* Expected usage is when there is a write
|
||||
* to the MHI core -> notify SM.
|
||||
*/
|
||||
mhi_log(MHI_MSG_INFO, "Wakeup by chan:%d\n", ch->ch_id);
|
||||
mhi_log(MHI_MSG_CRITICAL, "Wakeup by chan:%d\n", ch->ch_id);
|
||||
rc = mhi_dev_notify_sm_event(MHI_DEV_EVENT_CORE_WAKEUP);
|
||||
if (rc) {
|
||||
pr_err("error sending core wakeup event\n");
|
||||
|
|
|
|||
|
|
@ -676,7 +676,8 @@ extern void *mhi_ipc_log;
|
|||
|
||||
#define mhi_log(_msg_lvl, _msg, ...) do { \
|
||||
if (_msg_lvl >= mhi_msg_lvl) { \
|
||||
pr_err("[%s] "_msg, __func__, ##__VA_ARGS__); \
|
||||
pr_err("[0x%x %s] "_msg, bhi_imgtxdb, \
|
||||
__func__, ##__VA_ARGS__); \
|
||||
} \
|
||||
if (mhi_ipc_log && (_msg_lvl >= mhi_ipc_msg_lvl)) { \
|
||||
ipc_log_string(mhi_ipc_log, \
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@
|
|||
#define MHI_SM_DBG(fmt, args...) \
|
||||
mhi_log(MHI_MSG_DBG, fmt, ##args)
|
||||
|
||||
#define MHI_SM_CONSOLE_DBG(fmt, args...) \
|
||||
mhi_log(MHI_MSG_CRITICAL, fmt, ##args)
|
||||
|
||||
#define MHI_SM_ERR(fmt, args...) \
|
||||
mhi_log(MHI_MSG_ERROR, fmt, ##args)
|
||||
|
||||
|
|
@ -867,10 +870,10 @@ static void mhi_sm_dev_event_manager(struct work_struct *work)
|
|||
MHI_SM_FUNC_ENTRY();
|
||||
|
||||
mutex_lock(&mhi_sm_ctx->mhi_state_lock);
|
||||
MHI_SM_DBG("Start handling %s event, current states: %s & %s\n",
|
||||
mhi_sm_dev_event_str(chg_event->event),
|
||||
mhi_sm_mstate_str(mhi_sm_ctx->mhi_state),
|
||||
mhi_sm_dstate_str(mhi_sm_ctx->d_state));
|
||||
MHI_SM_CONSOLE_DBG("Handling %s event, current states: %s & %s\n",
|
||||
mhi_sm_dev_event_str(chg_event->event),
|
||||
mhi_sm_mstate_str(mhi_sm_ctx->mhi_state),
|
||||
mhi_sm_dstate_str(mhi_sm_ctx->d_state));
|
||||
|
||||
if (mhi_sm_ctx->syserr_occurred) {
|
||||
MHI_SM_DBG("syserr occurred, Ignoring %s\n",
|
||||
|
|
@ -952,10 +955,10 @@ static void mhi_sm_pcie_event_manager(struct work_struct *work)
|
|||
mutex_lock(&mhi_sm_ctx->mhi_state_lock);
|
||||
old_dstate = mhi_sm_ctx->d_state;
|
||||
|
||||
MHI_SM_DBG("Start handling %s event, current MHI state %s and %s\n",
|
||||
mhi_sm_pcie_event_str(chg_event->event),
|
||||
mhi_sm_mstate_str(mhi_sm_ctx->mhi_state),
|
||||
mhi_sm_dstate_str(old_dstate));
|
||||
MHI_SM_CONSOLE_DBG("Handling %s event, current states: %s and %s\n",
|
||||
mhi_sm_pcie_event_str(chg_event->event),
|
||||
mhi_sm_mstate_str(mhi_sm_ctx->mhi_state),
|
||||
mhi_sm_dstate_str(old_dstate));
|
||||
|
||||
if (mhi_sm_ctx->syserr_occurred &&
|
||||
pcie_event != EP_PCIE_EVENT_LINKDOWN) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue