Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b0fa0a0 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mhi_dev: Adding mhi and pcie state change logs to console"

parents 738d523e 02ccb1d6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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");
+2 −1
Original line number Diff line number Diff line
@@ -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,                     \
+11 −8
Original line number Diff line number Diff line
@@ -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,7 +870,7 @@ 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_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));
@@ -952,7 +955,7 @@ 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_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));