bus: mhi: ep: Add support for ring management
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tue, 5 Apr 2022 13:57:41 +0000 (19:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 11:17:41 +0000 (13:17 +0200)
commitbbdcba57a1a26a4439a4f4ecdbfaf80a10fd8f34
tree0ea5aa2c473af23daaf14752ece3b8e8387858ea
parente9e4da23cd65ea76ba658346f5c182791bd1cea9
bus: mhi: ep: Add support for ring management

Add support for managing the MHI ring. The MHI ring is a circular queue
of data structures used to pass the information between host and the
endpoint.

MHI support 3 types of rings:

1. Transfer ring
2. Event ring
3. Command ring

All rings reside inside the host memory and the MHI EP device maps it to
the device memory using blocks like PCIe iATU. The mapping is handled in
the MHI EP controller driver itself.

Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20220405135754.6622-6-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/mhi/ep/Makefile
drivers/bus/mhi/ep/internal.h
drivers/bus/mhi/ep/ring.c [new file with mode: 0644]