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

Commit f72e6125 authored by Sujeev Dias's avatar Sujeev Dias Committed by Gerrit - the friendly Code Review server
Browse files

mhi: cntrl: qcom: register for early error fatal notification



Register for early error fatal notification from esoc so we can
transition MHI into error state sooner.

CRs-Fixed: 2459916
Change-Id: I56bd66fa35c32cb36451bf50b9f644340b7d8d8d
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent 0c6a536e
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -261,6 +261,18 @@ static void mhi_arch_esoc_ops_power_off(void *priv, unsigned int flags)
	pm_relax(&mhi_cntrl->mhi_dev->dev);
}

static void mhi_arch_esoc_ops_mdm_error(void *priv)
{
	struct mhi_controller *mhi_cntrl = priv;

	MHI_LOG("Enter: mdm asserted\n");

	/* transition MHI state into error state */
	mhi_control_error(mhi_cntrl);

	MHI_LOG("Exit\n");
}

static void mhi_bl_dl_cb(struct mhi_device *mhi_device,
			 struct mhi_result *mhi_result)
{
@@ -537,6 +549,8 @@ int mhi_arch_pcie_init(struct mhi_controller *mhi_cntrl)
				mhi_arch_esoc_ops_power_on;
			esoc_ops->esoc_link_power_off =
				mhi_arch_esoc_ops_power_off;
			esoc_ops->esoc_link_mdm_crash =
				mhi_arch_esoc_ops_mdm_error;

			ret = esoc_register_client_hook(arch_info->esoc_client,
							esoc_ops);