bus: mhi: ep: Add support for handling MHI_RESET
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tue, 5 Apr 2022 13:57:47 +0000 (19:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 11:17:41 +0000 (13:17 +0200)
commit7a97b6b47353c60dd1b53ada6180741437e377f2
treef0d3a78045d00874a38b44cda88b6d2a9a6842d4
parent5d507ee04894e166f8c5a29f05c6b06ce91d5833
bus: mhi: ep: Add support for handling MHI_RESET

Add support for handling MHI_RESET in MHI endpoint stack. MHI_RESET will
be issued by the host during shutdown and during error scenario so that
it can recover the endpoint device without restarting the whole device.

MHI_RESET handling involves resetting the internal MHI registers, data
structures, state machines, resetting all channels/rings and setting
MHICTRL.RESET bit to 0. Additionally the device will also move to READY
state if the reset was due to SYS_ERR.

Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20220405135754.6622-12-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/mhi/ep/main.c
include/linux/mhi_ep.h