bus: mhi: core: Add device hardware reset support
authorLoic Poulain <loic.poulain@linaro.org>
Mon, 4 Jan 2021 16:14:50 +0000 (17:14 +0100)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Mon, 4 Jan 2021 16:20:24 +0000 (21:50 +0530)
commitb5a8d233a588b3acf2a7a3a8da30f8f68f376626
treed3beb0dba7f57b1251b6724be6d34cb942909ff0
parent5c8fe583cce542aa0b84adc939ce85293de36e5e
bus: mhi: core: Add device hardware reset support

The MHI specification allows to perform a hard reset of the device
when writing to the SOC_RESET register. It can be used to completely
restart the device (e.g. in case of unrecoverable MHI error).

This is up to the MHI controller driver to determine when this hard
reset should be used, and in case of MHI errors, should be used as
a reset of last resort (after standard MHI stack reset).

This function is a stateless function, the MHI layer do nothing except
triggering the reset by writing into the right register(s), this is up
to the caller to ensure right mhi_controller state (e.g. unregister the
controller if necessary).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/core/main.c
include/linux/mhi.h