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

Commit a0c381bb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mhi_dev: Initialize MHI only once after linkup"

parents 7821cfca daedab72
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2914,6 +2914,15 @@ static int mhi_dev_resume_mmio_mhi_init(struct mhi_dev *mhi_ctx)
	struct platform_device *pdev;
	int rc = 0;

	/*
	 * There could be multiple calls to this function if device gets
	 * multiple link-up events (bme irqs).
	 */
	if (mhi_ctx->init_done) {
		mhi_log(MHI_MSG_INFO, "mhi init already done, returning\n");
		return 0;
	}

	pdev = mhi_ctx->pdev;

	INIT_WORK(&mhi_ctx->chdb_ctrl_work, mhi_dev_scheduler);
@@ -3041,6 +3050,8 @@ static int mhi_dev_resume_mmio_mhi_init(struct mhi_dev *mhi_ctx)
		disable_irq(mhi_ctx->mhi_irq);
	}

	mhi_ctx->init_done = true;

	return 0;
}

+3 −0
Original line number Diff line number Diff line
@@ -564,6 +564,9 @@ struct mhi_dev {
	/* iATU is required to map control and data region */
	bool				config_iatu;

	/* Indicates if mhi init is done */
	bool				init_done;

	/* MHI state info */
	enum mhi_ctrl_info		ctrl_info;