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

Commit ba303bb9 authored by Bhaumik Bhatt's avatar Bhaumik Bhatt
Browse files

mhi: cntrl: qcom: read power down state from boot monitor



Boot monitor thread needs to wake up when core layer starts a
power down. If the execution environment value gets overwritten
by the time the thread wakes up, it will keep waiting until it
times out. Read the power down state instead to reliably exit
whenever core layer issues the wake up.

Change-Id: I9b629ce1f4f720fb1e28fe1b371666dc57264a28
Signed-off-by: default avatarBhaumik Bhatt <bbhatt@codeaurora.org>
parent 16b77022
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -312,7 +312,8 @@ static void mhi_boot_monitor(void *data, async_cookie_t cookie)

	/* wait for device to enter boot stage */
	wait_event_timeout(mhi_cntrl->state_event, mhi_cntrl->ee == MHI_EE_AMSS
			   || mhi_cntrl->ee == MHI_EE_DISABLE_TRANSITION,
			   || mhi_cntrl->ee == MHI_EE_DISABLE_TRANSITION
			   || mhi_cntrl->power_down,
			   timeout);

	ipc_log_string(arch_info->boot_ipc_log, HLOG "Device current ee = %s\n",
+2 −1
Original line number Diff line number Diff line
@@ -559,8 +559,9 @@ static int mhi_qcom_power_up(struct mhi_controller *mhi_cntrl)
			return -EIO;
	}

	/* when coming out of SSR, initial ee state is not valid */
	/* when coming out of SSR, initial states are not valid */
	mhi_cntrl->ee = 0;
	mhi_cntrl->power_down = false;

	ret = mhi_arch_power_up(mhi_cntrl);
	if (ret)