bus: mhi: ep: Add support for handling MHI_RESET
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Mon, 29 Nov 2021 09:30:07 +0000 (15:00 +0530)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Mon, 4 Apr 2022 04:47:51 +0000 (10:17 +0530)
commit2ee735c1734783ef0dbe604076676820006ff107
tree4c56c7b5b8dba9323cb94cc1a52411b946994884
parentc6dba8924201079093e1187a61934c6863b9efc1
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>
drivers/bus/mhi/ep/main.c
include/linux/mhi_ep.h