bus: mhi: core: Destroy SBL devices when moving to mission mode
authorBhaumik Bhatt <bbhatt@codeaurora.org>
Wed, 24 Feb 2021 23:23:02 +0000 (15:23 -0800)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 10 Mar 2021 14:41:22 +0000 (20:11 +0530)
commit925089c1900f588615db5bf4e1d9064a5f2c18c7
tree8246e8930fe9cee50f70e5fc0a1f87ee95ca7912
parent020d3b26c07abe274ac17f64999bbd3bf3342195
bus: mhi: core: Destroy SBL devices when moving to mission mode

Currently, client devices are created in SBL or AMSS (mission
mode) and only destroyed after power down or SYS ERROR. When
moving between certain execution environments, such as from SBL
to AMSS, no clean-up is required. This presents an issue where
SBL-specific channels are left open and client drivers now run in
an execution environment where they cannot operate. Fix this by
expanding the mhi_destroy_device() to do an execution environment
specific clean-up if one is requested. Close the gap and destroy
devices in such scenarios that allow SBL client drivers to clean
up once device enters mission mode.

Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Hemant Kumar <hemantk@codeaurora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/1614208985-20851-2-git-send-email-bbhatt@codeaurora.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/core/main.c
drivers/bus/mhi/core/pm.c