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

Commit 2764e6c9 authored by Yan He's avatar Yan He Committed by Gerrit - the friendly Code Review server
Browse files

mhi_dev: mhi: Fix a bug in ready bit update



The MHI environment needs to be set before ready bit is set. The
change here fixes this issue.

Change-Id: Ib6650ab163aec6a6039576df4af4353a7d2fdc8e
Signed-off-by: default avatarYan He <yanhe@codeaurora.org>
parent d0e1b944
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1729,6 +1729,14 @@ static int get_device_tree_data(struct platform_device *pdev)

	/* Invoke MHI SM when device is in RESET state */
	mhi_dev_sm_init(mhi_ctx);

	/* set the env before setting the ready bit */
	rc = mhi_dev_mmio_set_env(mhi, MHI_ENV_VALUE);
	if (rc) {
		pr_err("%s: env setting failed\n", __func__);
		return rc;
	}

	mhi_dev_sm_set_ready();
	rc = mhi_dev_mmio_write(mhi, MHIVER, MHI_VERSION_E);
	if (rc) {