]> git.baikalelectronics.ru Git - kernel.git/commit
bus: mhi: ep: Power up/down MHI stack during MHI RESET
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 28 Dec 2022 16:16:59 +0000 (21:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:50:19 +0000 (08:50 +0100)
commit59f39ebb40d498c282c98d8f7a4879e241b2cc65
tree86f0f048a045c8ccba64b3c064c1895204c11df1
parentee0f4a4aede6a496db9f53c3a08485137debd4c0
bus: mhi: ep: Power up/down MHI stack during MHI RESET

[ Upstream commit 62846c3729ca3729c3668315d5349516e8c4a777 ]

During graceful shutdown scenario, host will issue MHI RESET to the
endpoint device before initiating shutdown. In that case, it makes sense
to completely power down the MHI stack as sooner or later the access to
MMIO registers will be prohibited. Also, the stack needs to be powered
up in the case of SYS_ERR to recover the device.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://lore.kernel.org/r/20221228161704.255268-2-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Stable-dep-of: 7b96306c0515 ("bus: mhi: ep: Change state_lock to mutex")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/mhi/ep/main.c