bus: mhi: core: Handle EDL mode entry appropriately
authorBhaumik Bhatt <bbhatt@codeaurora.org>
Tue, 30 Mar 2021 01:28:20 +0000 (18:28 -0700)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 31 Mar 2021 11:17:07 +0000 (16:47 +0530)
commitad416db9fabe43b53a80deb4444d2a2e246b1cf1
tree16334fd19d36eab18b5532af22f85f55445170fb
parent4f214496ac7421b027a41d067e7753ee0bc5ad6c
bus: mhi: core: Handle EDL mode entry appropriately

Device entering EDL or Emergency Download Mode will be in a
SYS_ERROR MHI state. This requires MHI host to proceed with the
EDL image download over BHI before device can enter an MHI READY
state and proceed with further bootup. Allow this to be handled
by relying on the execution environment check after SYS_ERROR
processing to determine whether to wait for an MHI READY or
download the EDL image over BHI after moving MHI PM state to
Power on Reset internally. This way handling is contained well
within the MHI core driver and helps pave the way for Flash
Programmer execution environment functionality.

Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/1617067704-28850-4-git-send-email-bbhatt@codeaurora.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/core/pm.c