]> www.infradead.org Git - users/jedix/linux-maple.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)
commitb6dc68ac967a2fbce81cd96ae5798587f0e5bbf8
tree86f0f048a045c8ccba64b3c064c1895204c11df1
parent9ee18ff099b0d507a1aaebe8b068d891b4f3990e
bus: mhi: ep: Power up/down MHI stack during MHI RESET

[ Upstream commit 47a1dcaea07367c84238e71c08244ae3ed48c1cc ]

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: 1ddc76182940 ("bus: mhi: ep: Change state_lock to mutex")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/mhi/ep/main.c